add auth-service not verified with Dockerfile

This commit is contained in:
vankhaiphan 2021-05-28 01:01:00 +02:00
parent 3a7389ba68
commit 8cf6520224
12 changed files with 304 additions and 0 deletions

View file

@ -0,0 +1,32 @@
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
const cookieParser = require('cookie-parser');
app.use(cookieParser());
const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended:true}));
app.use(bodyParser.json());
const cors = require('cors');
app.use(cors({origin: 'http://127.0.0.1:4200', credentials: true}));
const mongoConnect = require('./mongodbConnect');
mongoConnect.connectToServer(function( err, client ) {
if (err)
console.log(err);
const checkLogin = require('./checkLogin');
app.post('/checkLogin', (req, res) => {
checkLogin(req,res);
});
app.listen(port, () => {
console.log (`listening on port ${port}`);
});
});