Giter Club home page Giter Club logo

wow-unicorns-app's Introduction

So Wow Unicorns App

A demo app built to review concept in Mongo, Express, Node, jQuery/ajax and HTML forms.

HTML API Endpoints

Visit 'http://localhost:3000/' to see the homepage.

JSON API Endpoints

  • Architectural Style: REST
  • Supported Request Formats: URI Query String/CRUD
  • Supported Response Formats: JSON
  • Host: http://localhost:3000

Unicorn Endpoint: http://localhost:3000/api/unicorns

RESTful Route Description controller#action
GET /unicorns Fetch a list of unicorns index
GET /unicorns/:id Fetch one specific unicorn show
POST /unicorns Create a new unicorn record create
DELETE /unicorns/:id Remove one specific unicorn destroy
PUT /unicorns/:id Change one specific unicorn update

Example Unicorn Response Object

{
    _id: "5927148048755023209525d8",
    name: "ralph",
    sparkles: false,
    number_of_horns: 1,
    created_at: "2017-05-25T17:19:45.566Z"
}

Setup

Clone this repo and cd into the project directory.

npm install

# open a new tab and run the mongodb server
mongod

# Run the seed task
node seed.js

# open a new tab and run the express server
node server.js     # this works fine
nodemon server.js  # but this is preferred

# finally, open your browser to localhost:3000
open http://localhost:3000

wow-unicorns-app's People

Contributors

nathanallen avatar

Watchers

James Cloos avatar Michelle Ferreirae avatar

Forkers

poliholic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.