web/index.js
2021-11-15 16:59:21 +07:00

17 lines
No EOL
425 B
JavaScript

const express = require('express')
const bodyParser = require('body-parser')
const session = require('express-session')
const app = express()
app.use(express.static('public'))
app.set('view engine', 'ejs')
const indexRouter = require('./routes/index');
const api = require('./routes/api');
app.use('/', indexRouter);
app.use('/api', api);
app.listen('3000', ()=> {
console.log('Server sudah berjalan di port 3000')
})