임태민

Update app.js

- Add ejs
......@@ -3,6 +3,12 @@ const bodyParser = require('body-parser');
const session = require('express-session');
const app = express();
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.engine('html', require('ejs').renderFile);
app.use(express.static('public'));
app.use(bodyParser.json());
app.use(session({
......@@ -14,7 +20,7 @@ app.use(session({
//Home
app.get('/', function(req,res){
res.send("Home page");
res.render("index.html");
})
//login
......
This diff is collapsed. Click to expand it.
......@@ -10,6 +10,7 @@
"license": "ISC",
"dependencies": {
"body-parser": "^1.19.0",
"ejs": "^3.1.6",
"express": "^4.17.1",
"express-session": "^1.17.1",
"mysql": "^2.18.1",
......