It's assumed you have installed Node.js on your Raspberry Pi board.
- Make a working directory, for example helloExpress.
$ mkdir helloExpress
$ cd helloExpress
- Install Express locally
$ npm install express
- Because our Express installed locally without path setting, express have to be run with path node_modules/express/bin/express. To create our Hello World, myApp. Run:
$ node_modules/express/bin/express myApp
- Then change to the created directory myApp.
$ cd myApp
- Install with npm
$ npm install
- Run the app:
$ node app
Then you can visit your express web app at port 3000 of your Pi's IP address.