login and register

This commit is contained in:
jslightham
2020-03-29 17:06:10 -04:00
parent a35b789e16
commit 80539432e7
11 changed files with 134 additions and 181 deletions

View File

@@ -5,6 +5,7 @@ const PORT = 4000;
const cors = require('cors');
const mongoose = require('mongoose');
const config = require('./DB.js');
const loginRoute = require('./login.route');
mongoose.Promise = global.Promise;
mongoose.connect(config.DB, { useNewUrlParser: true }).then(
@@ -16,6 +17,8 @@ app.use(cors());
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use('/login', loginRoute);
app.listen(PORT, function(){
console.log('Server is running on Port:',PORT);
});