reCluster server.
Note: dummy certificates are automatically generated
Name | Homepage |
---|---|
Docker |
https://www.docker.com |
K3d |
https://k3d.io |
Node.js |
https://nodejs.org |
npm |
https://www.npmjs.com |
Note: Copy
.env.example
and paste.env
Name | Description | Default | Values |
---|---|---|---|
NODE_ENV |
Node environment | production |
development | production | test |
HOST |
Server host | 0.0.0.0 |
Any valid host |
PORT |
Server port | 80 |
Any valid port |
DATABASE_URL |
Database URL | Any valid URL | |
SSH_USERNAME |
SSH username | root |
Any valid username |
SSH_PRIVATE_KEY |
SSH private key | Any valid file | |
TOKEN_PRIVATE_KEY |
Token private key | Any valid file | |
TOKEN_PUBLIC_KEY |
Token public key | Any valid file |
-
Environment
Note: See Environment for more information
Edit
.env
according to your configuration. -
Start
Note: Type
-- --help
for more informationnpm run dev
-
Execute Queries
-
Apollo Studio
Visit http://localhost:8080/graphql in your browser -
Manually
curl --request POST \ --header 'content-type: application/json' \ --url 'http://localhost:8080/graphql' \ --data '{ "query": "query { __typename }" }'
-
Note: Execute with
npm run <NAME>
Warning: On Windows, a script may fail to execute. Run it directly from
scripts
directory
Name | Description |
---|---|
build |
Compile server |
build:clean |
Clean compilation directory |
build:watch |
Compile server every time a file is updated |
check |
Check for errors |
dev |
Prepare and start development environment |
db:deploy |
Apply migrations in a production database |
db:generate |
Generate database assets |
db:reset |
Deletes and recreates the database |
db:seed |
Seed database |
db:studio |
Start a local web server with a web app that allows to interact and manage the database |
db:sync |
Synchronize database using migrations |
dockerize |
Generate Docker image |
fix |
Fix errors |
graphql:schema |
Save GraphQL schema to file |
start |
Start compiled server |
start:dev |
Start development/uncompiled server |