Just testing out how API's and node.js
/ez - Very simple API with GET, PUT, POST, and DELETE functionalities on static data
/harder - API connected to a DB (mongo)
/reactAPI - React app that uses a REST API
npm install
express
|
body-parser
|
mongoose
Setup all the tools react needs globally
npm install -g create-react-app
Create a react project
create-react-app <project name>
cd <project name>
Start project and loads local server
npm start
Start a npm project that will add the package.json
npm init
How to properly pull in a node module
npm install --save moduleName
This will download and add this module to your
node_modules
folder and the dependency. A benefit to this is that if someone is trying to import all the node modules for a project they can simply run
Connect - HTTP server framework
Socket.io - Server side component for websockets
Pug/Jade - Template engine inspired by HAML
Coffee-Script - CoffeeScript compiler
Redis - Redis client library
Express is a web framework for Node.js used to build web applications and API's. It uses MVC concepts
- M odel - The actual data. Database's, data storage..
- V iew - Displaying the user interface. What the user see's
- C ontroller - Direct traffic, route, load views..