CEOS
Opinionated graphql server based on TypeDI, TypeORM, and TypeGraphQL
Usage
- Install dependencies:
yarn add ceos
- Install dev dependencies:
yarn add -D dotenv nodemon ts-node tslint typescript
- Set up
start
script: node --inspect=5858 -r dotenv/config -r ts-node/register ./src/index.ts
- Set up the environment variables in
.env
(see below)
Configuration Variables
PORT
: The listening port of the serverDB
: Database configuration: postgres://postgres@[SERVER]:5432/[DATABASE]
DB_SYNC
: Automatically synchronize database modelsMAIL
: Mail configuration: smtp://[USER]:[PASSWORD]@[HOST]:[PORT]
MAIL_FROM
: Sender email
Examples
See examples/
for examples how to use ceos.
Development
Release a new version:
- Run tests:
yarn lint
- Bump the package version to the desired new version:
yarn version
- Commit and push:
git add package.json & git commit -m "bumped to $TAG" & git push
- Create a new branch:
git checkout -b release
- Build the library:
yarn build
- Add dist files:
git add -f dist & git commit -m "added distribution files"
- Create git tag:
git tag $TAG & git push --tags
- Publish the library:
npm publish
- Clean up:
git checkout master & git branch -f --delete release