Skip to content

bRRRITSCOLD/koa-knex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa-knex API

Rough company customers, products, line items, and invoices back-end API using Koa.js, knex.js, pg.js and PostgreSQL. Seeds are included and resemble a catering companies input.

Getting Started

A) Make sure that PostgreSQL is installed on your machine. My suggestion would be to use postgres through Homebrew, as this was developed on a Mac.

B) Navigate to application's directory and install dependencies.

npm install

C) Configure knexfile.js to use a current PostgreSQL, or create a database with the name blainerichardson to simply trial run the application.

D) Run knex migrations to create all necessary tables.

knex migrate:latest

E) If you wish you may seed the database with given data, you may choose to fill it with your own, or start from scratch.

knex seed:run

F) Start the server with npm.

npm Start

G) You should see the following, if you do not and encounter an error please raise an issue or retry from Step One.

> server@0.0.0 start path/to/directory/koa-knex
> node ./index.js

Server listening on port: 1337

H) Now using your favorite browser you may travel to https://localhost:1337 and use any of the endpoints given below. I suggest using Postman as it allows the ability to easily switch between all the built-in http method urls.

Customers:

Products:

Line Items:

Invoices:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published