Skip to content

Instantly share code, notes, and snippets.

@theptrk
Created July 14, 2018 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theptrk/8250a13aae1839f808e305912cb685df to your computer and use it in GitHub Desktop.
Save theptrk/8250a13aae1839f808e305912cb685df to your computer and use it in GitHub Desktop.
hello world: npm start script

package.json

{
  "name": "theptrk",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "author": "Patrick Tran",
  "license": "ISC",
  "dependencies": {
    "express": "^4.16.3"
  },
  "engines": {
    "node": "10.6.0"
  }
}

index.js

console.log("hello world")

command line

$ npm start stdout:

> theptrk@1.0.0 start /Users/path/to/theptrk
> node index.js
hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment