Binar Academy Full Stack Web Development Challenge Chapter 5 - Migrating to Node.js
- Clone the repository.
- Open directory.
- Run in terminal :
npm install
to install all required packages that listed in packages.json. - Run Server in terminal :
npm start
- To test if the routes work, try to click the 1st image of carousel (Rock Paper Scissor image).
- Try to go to undefined routes (ex:
localhost:3000/abcde
orlocalhost:3000/12345
) and you will be redirected into 404 page.
- Babel : Transcompiler
- Express : Node.js Framework
- EJS : View Engine
- ESLint : Linter - airbnb based
- Morgan : Logger (see the log on node console)
- controllers -> act as controller in MVC pattern.
- models -> act as data model in MVC pattern.
- routes -> web routes
- views -> act as views in MVC pattern using EJS.
- public -> Serve static files (css, images, js)