OgreBuzzard / 07-node-npm-express

Lab 7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CF Lab 07: NodeJS & NPM

Submission Instructions

Follow the submission instructions from Lab 01.

Resources

Node JS Docs

NPM JS Docs

Express JS Docs

Configuration

Your repository must include:

07-nodejs-npm-express
├── .eslintrc.json
├── .gitignore
├── LICENSE
├── README.md
├── node_modules
├── package-lock.json
├── package.json
├── public
│   ├── data
│   │   └── hackerIpsum.json
│   ├── index.html
│   ├── new.html
│   ├── scripts
│   │   ├── article.js
│   │   └── articleView.js
│   ├── styles
│   │   ├── base.css
│   │   ├── fonts
│   │   │   ├── icomoon.eot
│   │   │   ├── icomoon.svg
│   │   │   ├── icomoon.ttf
│   │   │   └── icomoon.woff
│   │   ├── icons.css
│   │   ├── layout.css
│   │   └── modules.css
│   └── vendor
│       └── styles
│           ├── default.css
│           ├── normalize.css
│           └── railscasts.css
└── server.js

Feature Tasks

As a user, I want to be able to create new articles and allow guests to retrieve those new articles.

  • Initialize the project with npm init, which creates package.json and package-lock.json files. Don't forget to add node_modules to your .gitignore file!
  • Use NPM to install ExpressJS, and ensure that it's been saved as a dependency in the package.json file.

As a developer, I want to use the ExpressJS framework to set up a server file to handle HTTP requests and deliver responses.

  • Instantiate the ExpressJS framework, configure the app.use middleware to interface with the file system, configure any needed routes, and tell the server to listen for incoming requests.
  • Run the server using node server and ensure that your app functions correctly. If you'd like to have your code live re-load the way that live-server did, install the NPM package nodemon and use that to run your server.

Stretch Goals

As a user, I want to access the form directly so I can easily add new articles.

  • Create a route and callback that will serve up the new.html page via a separate URI (Uniform Resource Identifier: in other words, the name of the route).

As a user, I want feedback if I have made an error so that I can make sure to always access the correct URL.

  • Create a 404 route to handle any requests other than index.html or new.html, and deliver a 404 status message to those invalid requests.

Documentation

Your README.md must include:

# Project Name

**Author**: Your Name Goes Here
**Version**: 1.0.0 (increment the patch/fix version number up if you make more commits past your first submission)

## Overview
<!-- Provide a high level overview of what this application is and why you are building it, beyond the fact that it's an assignment for a Code Fellows 301 class. (i.e. What's your problem domain?) -->

## Getting Started
<!-- What are the steps that a user must take in order to build this app on their own machine and get it running? -->

## Architecture
<!-- Provide a detailed description of the application design. What technologies (languages, libraries, etc) you're using, and any other relevant design information. -->

## Change Log
<!-- Use this are to document the iterative changes made to your application as each feature is successfully implemented. Use time stamps. Here's an examples:

01-01-2001 4:59pm - Application now has a fully-functional express server, with GET and POST routes for the book resource.

## Credits and Collaborations
<!-- Give credit (and a link) to other people or resources that helped you build this application. -->
-->

About

Lab 7


Languages

Language:JavaScript 43.3%Language:HTML 42.1%Language:CSS 14.6%