tanwinn / DummyNode

A Dummy web server using NodeJS 101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dummy Node JS

A dummy web server using NodeJS | Deployed to Heroku

Traversy Media Crash Course series (more)

Geting started

Clone the project

git clone git@github.com:tanwinn/nodeJS_dummy.git

Install depenedencies (package.json)

npm install

Run the server with nodemon

nodemon index.js

Stackedit.io

Overview

  • Has one thread & one event loop
  • Is asynchronous: uses callbacks
  • Is good with any task that is not CPU-intensive

NPM - Node Package Manager

  • Install 3rd party package manager (frameworks, libraries, & tools)
  • Packages are stored in node_modules
  • Dependencies listed in package.json
  • npm scripts can run certain tasks, such as run a server.

Node Modules

  • Node core modules (path, fs, http, etc.)
  • 3rd party modules/packages installed via npm
  • Build your own modules = files that have an export module.export = <class_name>;

Server

npm run <the_text> nodemon constantly observe the change during the development process, so the server doesn't have to be canceled and restarted every time the code is altered

Deploy in Heroku

https://my-dummy-node.herokuapp.com

About

A Dummy web server using NodeJS 101


Languages

Language:HTML 52.9%Language:JavaScript 31.7%Language:CSS 15.5%