-
Notifications
You must be signed in to change notification settings - Fork 0
Node NPM Express Socket.io
David da Silva edited this page Jul 1, 2018
·
1 revision
- Download / Upgrade Node.js: https://nodejs.org/en/
node
Opens a REPL (Read-Eval-Print Loop) in the terminal, allowing you to execute lines of javascript and seeing their result.
node <script-path>
Makes Node executes the given script as the "main" file.
npm init
Sets up initial package.json
in the current folder. All the descending directories are considered part of the same project.
npm install <package-name>
Installs a npm package.
npm install --save <package-name>
Installs an npm package, and saves its version in the project's package.json
.
- Express example: https://github.com/expressjs/express/blob/master/examples/hello-world/index.js
- Express params in URL: https://expressjs.com/en/api.html#req
- Express querystring: https://expressjs.com/en/api.html#req.query
- Socket.io Chat example: https://github.com/socketio/socket.io/blob/master/examples/chat/index.js