- Install dependencies:
npm i
- Run the express server:
npm run dev:server
- Verify it works: Go to another terminal window:
curl localhost:3000
. The terminal window should say: `hello python!` - Deploy to Raspberry Pi
- Install node.js on RBP
- Make a deploy folder on your RBP
- Copy both
dist
andsrc
folders over. Note: only the Python script is needed. - Install the "external" dependencies in your deploy folder:
npm i express
- Run the server:
node dist/server.js
- Verify it works: See above.
gengwang / learn-full-stack-node-js Goto Github PK
View Code? Open in Web Editor NEWA seed project using Node.js and Express that invokes a child process