How Can We Help?
< Back
You are here:
Print

Express – NPM-StarterProject

To Build a New Express Project:
express expressproject
cd expressproject
npm install

This first creates a new folder called expressproject.


Inside it, you will see 2 files called app.js and package.json, and 5 directories called bin, node_modules, public, routes, and views. This will also install Express for your project. You can now run npm start to start your Express server. If everything is setup correctly, you will see the following:

npm start

expressproject@0.0.0 start /root/expressproject
> node ./bin/www

In your web browser, navigate to the IP address of your VPS at port 3000. The URL is as follows (replace 0.0.0.0 accordingly):

http://0.0.0.0:3000

Table of Contents