Repository files navigation
This is a simple workshop that will cover basic Node.js, Express, and Socket.io usage.
You will be creating a web chat application and deploying it to the Cloud.
Installing Node.js and NPM (non-Windows)
Install NVM
Install the latest version of Node.js: nvm install 10
Check that it worked: node --version and npm --version
Update NPM to the latest version: npm install --global npm
Installing Node.js and NPM (Windows)
If you are using Windows, you can use a Linux VM or...
Install NVM for Windows
Install the latest version of Node.js: nvm install latest
Close and re-open Command Prompt
Check that it worked: node --version and npm --version
Update NPM to the latest version: npm install --global npm
Install git if you have not already.
cd to the directory you want to install this repo in.
Clone this repo: git clone https://github.com/SCUACM/node-workshop
cd into the newly created node-workshop directory.
If you ls, you should be able to see package.json.
/package.json - File that specifies app details and dependencies for NPM.
/node_modules - Folder for all your app's NPM dependencies.
/public - Public-facing (client) code.
/public/scripts - Client Javascript (scripting).
/public/stylesheets - Client CSS (styling).
/public/index.html - Our frontend's main HTML file.
/server.js - Main file that holds all our server code.
Install all node dependencies: npm install.
You can check that it worked if node_modules folder has been created.
Run npm start to start your server.
Create a free account at Heroku .
Install Heroku's command-line tool based on your OS.
Run heroku login and enter in your new Heroku account's credentials.
Run heroku create to create a new Node.js instance.
Commit all your changes: git add --all && git commit -m "Your message"
Run git push heroku master to send your changes to the Cloud!
View your instance on the web: heroku open
If you make more changes, commit your new changes and re-push to Heroku.
Understanding Node.js "Async"
About
Simple Node + Socket.io + Express tutorial
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.