Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alumni tracking system #460

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.idea/
.vscode/
.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

const models = require('../models');

module.exports = async function (eventEmitter) {
try {
await models.sequelize.authenticate();
// eslint-disable-next-line no-undef
console.log('Connected to SQL database:', config[config.node_env].database);
/* if (_config.app === 'dev') {
models.sequelize.sync(); //creates table if they do not already exist
// models.sequelize.sync({ force: true });//deletes all tables then recreates them useful for testing and development purposes
} */
eventEmitter.emit('db-connected');
} catch (err) {
// eslint-disable-next-line no-undef
console.error('Unable to connect to SQL database:', config[config.node_env].database, err);
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const express = require("express");
const router = express.Router();
const AlumniRegister = require("../app/controllers/alumniRegister");
const CollegeRegister = require("../app/controllers/collegeRegister");
const search = require("../app/controllers/searchDetails");
const event = require("../app/controllers/eventupdate");
const login = require("../app/controllers/Login");
const Middleware = require("../middlewares/jwt_decode");

router.post("/AlumniRegister", AlumniRegister.RegisterAlumni);
router.post("/CollegeRegister", CollegeRegister.RegisterCollege);
router.post("/EventDetails", event.EventDetails);
router.put("/updateDetails", AlumniRegister.UpdateDetails);
router.get("/SearchAlumniYearWise/:year", search.SearchAlumniYearWise);
router.get(
"/SearchAlumniCollegeWise/:CollegeId/:year",
search.SearchAlumniCollegeWise
);
router.get(
"/SearchAlumniYear_CollegeWise/:CollegeId/:year",
search.SearchAlumniYear_CollegeWise
);
router.get("/GetAllColleges", search.GetAllColleges);
router.post("/login", login.Login);
router.get("/GetEvents/:ClgId", event.GetEvents);

module.exports = router;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
build/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Realtime Chat Application

![Video Chat](https://i.ibb.co/7WZRLD1/122.jpg)

## Introduction
This is a code repository for the corresponding video tutorial.

In this tutorial, we're going to build and deploy a React Video Chat Application using WebRTC.

Setup:
- run ```npm i && npm start``` for both client and server side to start the development server
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const app = require("express")();
const server = require("http").createServer(app);
const cors = require("cors");

const io = require("socket.io")(server, {
cors: {
origin: "*",
methods: [ "GET", "POST" ]
}
});

app.use(cors());

const PORT = process.env.PORT || 5000;

app.get('/', (req, res) => {
res.send('Running');
});

io.on("connection", (socket) => {
socket.emit("me", socket.id);

socket.on("disconnect", () => {
socket.broadcast.emit("callEnded")
});

socket.on("callUser", ({ userToCall, signalData, from, name }) => {
io.to(userToCall).emit("callUser", { signal: signalData, from, name });
});

socket.on("answerCall", (data) => {
io.to(data.to).emit("callAccepted", data.signal)
});
});

server.listen(PORT, () => console.log(`Server is running on port ${PORT}`));
Loading