Skip to content

ticet11/NodeCrashCourse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Crash Course

Oh, no! I have to learn Node! Thanks, Traversy Media.

This is a simple server, built with Node.js, featuring some static HTML pages and styles and a single API endpoint.

Pages and Endpoints

  • / - Home page
  • /about - About page
  • /error - Custom 404 page (should be triggered by any unknown path)
  • /api/people - Returns a small collection of people

Reference Folder

This reference folder contains examples of how several packages included with Node can be used for things like file creation and manipulation, which can be used by cloning this repo (instructions below).

Modules Used

Included with Node

  1. Events - create, fire, and listen for events
  2. File system - enables interacting with the file system
  3. HTTP - allows Node.js to transfer data over HTTP
  4. OS - provides operating system-related utility methods and properties
  5. Path - provides utilities for working with file and directory paths
  6. URL - provides utilities for URL resolution and parsing

External Packages

  1. nodemon - automatically restarts application when file changes are detected. (Used in development)
  2. uuid - creates RFC4122 UUIDs

Running Locally

If, for some reason, you want to run this on your own machine (assuming you already have Node and Git installed):

  1. Clone this repo to a folder of your liking.

    $ git clone https://github.com/ticet11/NodeCrashCourse

  2. Install necessary packages.

    `$ npm install'

  3. Run the project (running in development mode will use nodemon, explained above)

    $ npm run start OR $ npm run dev