web/index.js

15 lines
366 B
JavaScript
Raw Normal View History

2021-11-02 06:20:20 +01:00
const express = require('express')
2021-11-09 03:11:53 +01:00
const bodyParser = require('body-parser')
const session = require('express-session')
2021-11-02 06:20:20 +01:00
const app = express()
app.use(express.static('public'))
app.set('view engine', 'ejs')
2021-11-09 03:11:53 +01:00
const indexRouter = require('./routes/index');
2021-11-02 06:20:20 +01:00
app.use('/', indexRouter);
app.listen('3000', ()=> {
console.log('Server sudah berjalan di port 3000')
})