Git Product home page Git Product logo

pmsapi's Introduction

Build Status

PMS-API

Introduction

PMS-API is an application built using Node, Express, PostgreSQL and Sequelize that enables users to create locations with populations for both male and female populations.

Table of Content

Features in the application

  • Users can create a new location. (Location can have sub locations, and must have population values for both male and females)
  • Users can update location information
  • Users can delete location
  • Users can fetch all locations

Technology Stack used

  • NodeJS
  • ExpressJS
  • PostgreSQL
  • Sequelize

Getting Started

  • Before cloning the repo, make sure you have Node and PostgresQL installed on your local machine
  • Clone the repo to your local machine
> $ git clone https://github.com/billmike/PMSAPI.git
  • Change directory into the more-recipes directory
> $ cd PMSAPI
  • Install all required dependencies by running
> $ npm install
  • Create a database to be used with the application
  • Migrate database by running
> $ sequelize db:migrate
  • To start the application, run
> $ npm run start:dev

API docs

  • POST localhost:8000/api/location

    • To create a location, hit this endpoint via postman and supply name, femalePopulation, malePopulation and an optional parentLocationId parameter to the request body
  • GET localhost:8000/api/location/:locationId

    • To get one location, hit this endpoint via postman and supply the locationId parameter in the URL.
  • GET localhost:8000/api/locations

    • To get all locations, hit this endpoint via postman to retrieve all locations.
  • PUT localhost:8000/api/location/:locationId

    • To edit a location and it's data, hit this route in postman and supply the locationId params. Provide the values to be edited in the request body.
  • DELETE localhost:8000/api/location/:locationId

    • To delete a location, provide the locationId as a parameter to the URL.

pmsapi's People

Contributors

billmike avatar

Watchers

James Cloos 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.