DinmaOtutu / population-management-system

This is a system that manages the population of states in Nigeria

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

population-management-system

This is a system that manages the population of states or community

Coverage Status

Setup

Dependencies

list of libraries, tools, and technologies used.

  • express.js - Fast, unopinionated, minimalist web framework for Node.js
  • Node.js - A JavaScript runtime environment
  • MongoDB - For database services
  • A package manager - [NPM

Getting Started

  • clone the repo - https://github.com/DinmaOtutu/population-management-system.git
  • Navigate to the project directory and open on any editor, VS Code preferably.
  • Install the project dependencies by running npm Install
  • After installation, run npm test
  • To start the server run npm start #production
  • To start the server run npm run dev #dev

Project Structure

The project structure follows the MVC (Model-View-Controller) pattern. You can think of the JSON representation of data returned by the API as the 'view'.

├── src/
    ├── controllers
        ├── LocationController.js
    ├── helpers
        ├── totalPopulation.js
    ├── middlewares
        ├── checkLocationExist.js
        ├── errorHandler.js
        ├── verifyInputs.js
    ├── models
        ├── Location.js
    ├── repositories
        ├── BaseRepository.js
    ├── routers
        ├── index.js
        ├── location.js
    ├── tests
        ├── location.js
    ├── utils
        ├── logger.js
    ├── app.js
├── README.md

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

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

API Endpoints

HTTP VERBENDPOINTSDESCRIPTION
POST/api/locationCreates a new location
GET/api/locationReturns available locations
PUT/api/location/:idUpdates a location
DELETE/api/location/:idDeletes a location

Postman Documentation

https://documenter.getpostman.com/view/4552812/S1Lr5rYz

AUTHOR

  • Yours truly DinmaOtutu

About

This is a system that manages the population of states in Nigeria


Languages

Language:JavaScript 100.0%