Skip to content

A node application that servers a GraphQL API to interact with users that needs to complete actions for certain campaigns

Notifications You must be signed in to change notification settings

debtcollective/campaign-api

Repository files navigation

Campaign API 👋

All Contributors Version License: ISC Twitter: StrikeDebt

This service makes relations between users and campaigns of your organizations, those campaigns have actions that help to promote the awareness of your initiatives.

Dependencies

These are the apps you will need to have installed in order to run this app.

Install

Knexfile

Run the command below to init the database configuration.

cp knexfile.template.js knexfile.js

You will need to modify variables to fit your environment, more importantly the user and superuser fields

Packages

Run the command below to install the packages for this app.

yarn install

Usage

Runs the service that expose a GraphQL endpoint.

yarn start

NOTE: If you need to have some data for testing/development proposes you may want to take a look to models/stubs/development.seed.js file in order to populate your development database with some data

Running with Docker

You can use docker-compose to run the project with Docker if you prefer that, or to test that the image is building correctly.

docker-compose up

To create database and run migrations run in another terminal

docker-compose run --rm app yarn db:create
docker-compose run --rm app yarn db:migrate

Run tests

In order to being able to run this you have to:

  1. Create a database called "campaign_api_test". You can do this by running NODE_ENV=test yarn db:create
  2. Migrate the database running NODE_ENV=test yarn db:migrate
  3. Run the tests with yarn test or with coverage running yarn test:ci

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Alexis Duran
Alexis Duran

🚇 ⚠️ 💻
Orlando Del Aguila
Orlando Del Aguila

🚇 ⚠️ 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

A node application that servers a GraphQL API to interact with users that needs to complete actions for certain campaigns

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages