After cloning a project node_modules should be installed:
npm install
This command will install all necessary modules for this app Correct versions of modules can be found in package.json file
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:5000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm run build
Builds the app for production to the dist folder.
This project includes following npm packages:
- express - package for creating a router
- nodemon - package for automatically restarting a node application after any changes
- webpack - package for generating one or more bundles
- Babel - package for converting ES6 into compatible version of JS in current and older browsers
Files explanation:
- package-json - contains app arhitecture
- package-lock.json - contains all packages that use the app with exact versions
- nodemon.json - contains object with properties and determines what folder nodemon will be watch and what will be executed
- .babelrc - contains babel configuration
- router.js - application router, dispatch all incoming URL-s
- middlewares.js - contains middleware functions. This functions are invoked in router.js
- contoller.js - contains function for any route. This functions are invoked in router.js
- index.js - file when is port is defined and axpress is initialized
- main.js - output folder when build is created