Giter Site home page Giter Site logo

restful's Introduction

RESTful

A basic RESTful application with HATEOAS using Node.js, Express and MongoDB.

Prerequisites

MongoDB

You'll need the community edition of MongoDB install before running this application. To do this run the following commands in terminal:

brew update

brew tap mongodb/brew

brew install mongodb-community

After installing MongoDB, you'll have to manually create where it saves the databases. This is thanks in part to changes made in macOS 10.15. To do this run the following command in terminal:

sudo mkdir -p /data/db

Next, you'll want to let MongoDB know where this is. To do this with Visual Studio Code, open up the config file as such:

code /usr/local/etc/mongod.conf

Now make the following change, replacing <username> with your username:

storage:
  dbPath: /Users/<username>/data/db

Before we can start using the application we'll also need to install a dummy database. From terminal run:

mongo bookAPI < booksJson.js

Install Dependencies

yarn

Build the Server

yarn build

Starting the RESTful API

After build the application and installing MongoDB, start the application by running the following in terminal:

yarn start

restful's People

Contributors

itzjonas avatar dependabot[bot] avatar jasonseegmiller avatar

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.