🖍️
graphql-node-jobs
  • Graphql-Node-Jobs
  • What's a Job/Batch/Pipeline?
  • Running the server
  • Creating a worker
  • The GNJ API
  • Plugin the server to your express
  • Q&A
  • Contributing
Powered by GitBook
On this page

Was this helpful?

Running the server

PreviousWhat's a Job/Batch/Pipeline?NextCreating a worker

Last updated 5 years ago

Was this helpful?

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 : 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 .

Migration the GNJ schema

npx gnj migrate ./../yourSequelizeConfigFile.js

Start an In-memory server (no DB)

npx gnj run-in-memory

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

http://localhost:8080/graphql
pm2
http://localhost:8080/graphql