Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

API Server for Availability

License: MIT codecov Build Status

This is an API server for Availability. It generates some standard data at boot but otherwise allows for normal signups, logins and data mutations persisting to a sqlite database using Sequelize.

We plan to switch to using a proper networked RDBMS soon.

The server was originally built using the wonderful Chatty tutorial.

It uses:

Install

Clone the repo, cd into the directory and run the following to install the dependencies:

yarn

IMPORTANT: Edit src/config.js to set a secret if you're even remotely interested in running this in production.

Run server

yarn run start

Deploy

The server is deployed sporadically to Heroku (by @sdunster) by running:

yarn run deploy-heroku

You can play with the API here. The data is wiped whenever the Heroku web dyno is shut down or re-deployed.

If you'd like to deploy yourself you can build a bundle into dist/ by executing:

yarn run build

You can then execute the production-ready server bundle using:

yarn run serve

Or just execute main.js:

node dist/main.js

Once you have a server running you can access GraphQL at /graphql or you can play with the API explorer at /graphiql.

Contributing

Contributions of all kinds are welcomed but please explain what you did to verify your change didn't cause a regression in your pull request. Writing a new test case for your new feature is probably the best way to do this since Travis will perform the tests for all pull requests.

Please ensure commits that land on master are self-contained changes and easily revertable. This can be achieved through non-fast-forward pushes to PR branches for PRs that contain multiple commits or by using GitHub's squash and merge feature when you merge the PR.

CI/Travis must pass before a PR can be merged. We look for test coverage in all commits but do not require that codecov passes.