✅ initialize node:
npm init
✅ install basic middleware:
npm install express ejs
✅ install nodemon server in dev dependencies:
npm install nodemon --save-dev
✅ add start scripts to package.json:
scripts": {"test": "test", "start": "node server.js","dev": "nodemon server.js"}
✅ start dev nodemon server:
npm run dev
✅ router files:
/routes
✅ view pages:
/views
/public/img/icons/favicon.ico
<link rel="icon" type="image/x-icon" href="../public/img/icons/favicon.ico" />
app.use('/public/index.html', express.static('public/index.html')); app.use('/public', publicRouter);