Start Express

To start your application server, you just have to start the Bitnami console and then execute the following command, inside your application directory:

$ npm start

If you are using a recent Express version (greater than 4.0), you should use the following command instead:

$ DEBUG=sample:* ./bin/www (Linux and Mac OS X native installers)
$ node bin\www (Windows native installer)

Port 3000 is the default port used by Express when creating the template. This means that you may receive an error similar to the below when starting the server:

Error: listen EADDRINUSE
 at errnoException (net.js:670:11)
 at Array.0 (net.js:771:26)
 at EventEmitter._tickCallback (node.js:190:38)

This means that the port is already in use. Edit the app.js script and change the line containing app.listen() to use a different port number, as below. Then, start the application again.

app.listen(4000, function (){
Last modification April 22, 2020