Skip to the content.

Table of contents

  1. Getting started
  2. What’s a Job/Batch/Pipeline
  3. Running the server
  4. Creating a worker
  5. The GNJ API
  6. Plugin the server to your express
  7. Q&A
  8. Contributing

Available commands


Start the default server

GNJ provides a out-of-the-box server if needed:

npx gnj run

When the server is started, you can open the following url : http://localhost:8080/graphql and discover the schema. If it’s the first time you run it, an Sqlite database will be created in the “./data” folder relative to the path you started it.
You can also run the following command to run a server with a specific database.

npx gnj run ./../yourSequelizeConfigFile.js

GNJ is build as a micro-service but can also be embedded in your application if needed. We advise to run it and the associated workers with a process manager like pm2.


Migrate the GNJ schema

npx gnj migrate ./../yourSequelizeConfigFile.js //the path from node_modules

Start an In-memory server (no DB)

npx gnj run-in-memory

When the server is started, you can open the following url : http://localhost:8080/graphql and discover the schema. If you shutdown the server, all data will be lost.


Previous: What’s a Job/Batch/Pipeline

Next: Creating a worker


Teamstarter’s other libraries