NodeJs App

Posted on

Simple App based on npm express framework
initialize the app folder to create the the package.json

npm init
...utility will walk you through creating a package.json file...
name: (NodePiApp) NodePiApp
version: (0.0.0) 1.0.0
description: Simple nodejs npm app
entry point: (index.js)
test command:
git repository:
keywords: express
author: Gi.....el
license: (ISC) MIT

About to write to /home/pi/Public/NodePiApp/package.json:

Add npm user data

npm adduser 
Username: gilmedel
Password:
Email: (this IS public) bi....@...mail.com

install the the package using the –save option which saves the version number and creates dependency in the package.json file

npm install express --save

After installation the following should appear in the package.json file:
“dependencies”: { “express”: “^4.16.4” },

Verify publishing app to npm repository

npm publish