In this blog i would like to explain how to create a sample NodeJs application.
- Open command prompt and create a directory
- Install express-generator module at global level, we would use this to create express(Node js web framework) templates.
npm install -g express-generator
- Use express cli to create template app. This would create all the required files for a sample app in existing folder.
- Install required Nodejs modules using following command. By doing this, it will install all the required modules present in package.json file.
Use the below command to start app on local server and also make sure if template app is working on local environment.
Navigate to http://localhost:3000 in your Browser.