Skip to content

uchemukolo/populationManagementSystemAPI

Repository files navigation

populationManagementSystemAPI

An application that contains a list of locations and the total number of residents in each location broken down by gender.

Project Structure

The project structure follows the MVC (Model-View-Controller) pattern.

├── src
│   ├──tests
│   │  ├── __mockData__
│   │   │   └── index.js
│   │   └── index.test.js
│   ├── config
│   │   └── config.js
│   ├── controllers
│   │   └── PopulationController
│   │   │      └── PopulationController.js
│   ├── helpers
│   │   └── errorHandler.js
│   ├── middlewares
│   │   └── PopulationValidator.js
│   │   migrations
│   │        └── 20190822001741-create-population-management.js
│   │   seeders
│   │   models
│   │        └── index.js
│   │        └── populationmanagement.js
│   └── routes
│       ├── index.js
│       └── locationRoutes.js
│   └── app.js

Requirements

  • Node.js
  • npm
  • PostgresDB
  • Sequelize

Getting Started

$ git clone https://github.com/uchemukolo/populationManagementSystemAPI.git
$ cd populationManagementSystemAPI
$ npm install
$ npm start                  # For development purpose

You should now be able to access the API via http://localhost:port/api/v1/

NOTE: Create a .env file configuration following the .env.sample.

Project Details

locations:

  • create population for a location
  • get population for a location
  • update a location
  • delete a location

API Endpoints

HTTP VERBENDPOINTSDESCRIPTIONQUERY
GET/api/v1/locationsGets a location
POST/api/v1/locationsCreates locations
PUT/api/v1/locations/:locationIdUpdates a location
DELETE/api/v1/locations/:locationIdDeletes a location

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published