Skip to content

Latest commit

 

History

History
102 lines (79 loc) · 2.47 KB

File metadata and controls

102 lines (79 loc) · 2.47 KB

Logo

TwiggyBuffalo/nodejs-api-example

A NodeJS RESTful API example with Express.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

This project should help you get an idea of creating a RESTful API in NodeJS. It's utilizes Mongoose for models and writes to a MongoDB instance.

Getting Started

Follow these quick and easy steps and you'll be up and running in no time.

Installation

  1. Clone the repo
    git clone https://github.com/TwiggyBuffalo/nodejs-api-example.git
  2. Install dependencies
    npm i
  3. Either start a local MongoDB instance using the mongod cmd or alternatively provide and env variable as follows for a remote MongoDB instance
    DB_URL=mongodb://connection-string-here
  4. Start the project by running
    npm run start
  5. Open a web browser and head over to http://localhost:3000/users to fetch users. To create users POST to the same URL with the body
    {
      name: Joe Soap
      email: joe@soap.com
      password: J03S04P!
    }

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

  1. Fork the Project
  2. Make your changes
  3. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Twitter - @TwiggyBuffalo
GitHub - TwiggyBuffalo