web/index.js

14 lines
284 B
JavaScript
Raw Normal View History

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