- use git to clone
git clone https://github.com/egin10/belajar-nodejs.git
on terminal console - use
cd belajar-nodejs && npm install
orcd belajar-nodejs && npm i
to change directory and install module from package.json - change this code on
mysql.js
, make it same like your database host, user, password etc.host: 'localhost', user: 'root', password: '', database: 'belajar_nodejs', port : 3306
, you can see database structure on filebelajar_nodejs.sql
or you can import it to your mysql database. - run using
npm start
ornodemon app
- server is running on
http://localhost:3000/
explore it!