oapen-suggestion-service/api
Justin O'Boyle 535715932d
Setup docker (#26)
* basic config

* Add github action

* Fix makefile for linux and variable python (#27)

* fix makefile

* remove out

* add to gitignore

* Fix makefile for linux and variable python (#27)

* fix makefile

* remove out

* add to gitignore

* Fix dockerfile

* stash changes

* Make makefile dynamic (#28)

* Remove broken docker packages for now

* Add web

* Make Black Formatter happy?

Co-authored-by: Max Zaremba <max.zaremba@gmail.com>
2022-12-13 07:46:08 -05:00
..
db OAP-40 Align API more closely with ngram generation, fix environment (#21) 2022-11-14 15:20:43 -05:00
.gitignore OAP-40 Align API more closely with ngram generation, fix environment (#21) 2022-11-14 15:20:43 -05:00
Dockerfile Setup docker (#26) 2022-12-13 07:46:08 -05:00
README.md OAP-38: Add /ngrams endpoint to API (#19) 2022-11-09 18:45:48 -05:00
app.js OAP-40 Align API more closely with ngram generation, fix environment (#21) 2022-11-14 15:20:43 -05:00
config.env OAP-17: PostgreSQL integration into API with pg-promise, data function to read from DB, dotenv to read DB credentials from environment variables (#9) 2022-10-26 03:07:10 +00:00
package-lock.json OAP-38: Add /ngrams endpoint to API (#19) 2022-11-09 18:45:48 -05:00
package.json OAP-38: Add /ngrams endpoint to API (#19) 2022-11-09 18:45:48 -05:00
routes.js OAP-40 Align API more closely with ngram generation, fix environment (#21) 2022-11-14 15:20:43 -05:00
validate.js OAP-40 Align API more closely with ngram generation, fix environment (#21) 2022-11-14 15:20:43 -05:00

README.md

OAPEN Suggestion API

About

A basic Node.js + Express api using pg-promise to interface with PostgreSQL and dotenv to read environment variables

Database Configuration

To configure the database connection, create a file called config.env in api/ with the contents

DATABASE_URL="postgres://username:password@host:port/database"
PORT=PORT_NUMBER

e.g.

DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
PORT=3001

To populate the database with seed data, run make setup-env from oapen-engine/

Running with npm

npm ci
npm start

Endpoints