Tweet-311-Denver / tweet_311_denver_service

Backend for Tweet311Denver Turing Project
MIT License
1 stars 0 forks source link

Setup hapi api with sequelize orm #4

Closed ap2322 closed 4 years ago

ap2322 commented 4 years ago

Setting up the hapi framework is as easy as making a server on the index.js file in the root folder per instructions from hapi.dev.

Connecting the Sequelize ORM was a bit trickier and Dustin and I followed a combination of tutorials to get it up and running.

Currently, the organization of this api is delicate because I don't know exactly how to refactor things. Configuring for deployment will probably require refactoring.

This first iteration sets up a database with a locations table and 2 endpoints: get /api/v1/locations and post /api/v1/locations

Dependencies:

    "hapi": "^18.1.0",
    "pg": "^7.18.1",
    "pg-hstore": "^2.3.3",
    "sequelize": "^5.21.4",
    "sequelize-cli": "^5.5.1"

Not yet tested