Hackathon: Day 3 - Node.JS

Using the terminal we installed Heroku by typing the command, "sudo npm install heroku -g".
To make sure that git was installed we tested this by typing the  command, "git --version"


As git wasn't installed in my computer, the terminal requested the install which I accepted.
After the install finished, I typed the command, "git --version" again which confirmed that git was installed.


Following Mar's instructions, we created a demo directory using the terminal.



This created the "demo" folder.


We then needed to update the "package.json" file to include a start script and change the "main" property to app.js.


We added the following code to app.js.


In the terminal we added the following commands:
  • $ git init
  • $ git add *
  • $ git commit -m 'Initial commit' 
 This created many modes.


We logged into Heroku using the terminal.


We commanded Heroku to create the app and pushed this to Heroku master.


Once this was complete, we then commanded the terminal to open Heroku.



This opened my web browser and displayed "Hello World" which was written in the app.js file.


When viewing my Heroku dashboard, this was added as an app.


Comments

Popular posts from this blog

Unity Project 4: Ball platformer game

[Research] Traditional Poster Design (4CTA1214)