项目作者: nickbouldien

项目描述 :
Small api using Node, Hapi v17, Knex, and PostgreSQL
高级语言: JavaScript
项目地址: git://github.com/nickbouldien/knex_paises.git
创建时间: 2018-11-14T04:18:43Z
项目社区:https://github.com/nickbouldien/knex_paises

开源协议:

下载


Knex Países - People

Just a simple api messing around with Hapi and its ecosystem. (I had always heard good things about Hapi, but never used it, so I made an excuse to mess around with it for a few days (with Knex - another library I had read good things about). The “theme” deals with famous people from different countries (países)).

Start Dev:

  • clone/fork
  • npm install
  • npm run migrate-latest
  • npm run seed
  • npm run dev
  • can view swagger docs to see available routes

Knex setup:

  • knex init
  • configure knexfile.js
  • cd to knex/migrations/ and run knex migrate:make new_migration
  • edit migration file and run knex migrate:latest
  • seed: cd to knex/seeds and run knex seed:make new_seed
  • edit seed file and run knex seed:run

Sample Queries (using localhost):

TODOs:

  • use knex
  • add swagger docs
  • add prettier
  • add dotenv
  • add tests
  • add graphql???

Resources: