This is a api server of "GQL JOBS" application. GraphQL + Apollo = ❤️
- Node v16 or more
- MongoDb v5 or more
- Mailgun account (set in .env)
-
Start you MongoDB database
-
Install dependencies via
npm install
// or
yarn install
- Build via
npm run build
// or
yarn build
- Copy .env.tpl as .env
cp .env.tpl .env
- Start
npm run start
// or
yarn start
The project comes with Docker setup if you need just run the server (if you are developing frontend). To do that
- Build the app
npm run build
// or
yarn build
- Run docker compose
docker-compose up
Be aware that database would be restored automatically, no additional efforts required.
If you have local version of mongo db. You can restore database via
./mongorestore.sh
Or you can run docker-compose, switch off the app server and run you local one. Connect to DB as always via localhost:27017, so how ports are forwarded
After DB is in place, you can run
yarn dev
In case if you won't create mailgun account you can go without it, but emails won't be sent. But there is log in the console. If you using docker container - just check docker logs, link with token would be sent in console (docker logs container_id --follow). Or if you use your local machine just check console.
email: soooyc@yandex.ru password: admin89Q!
operations: {"query":"mutation UploadFile($file: Upload!) { uploadFile(file: $file){ message file { path } }}"}
map: {"0": ["variables.file"]}
0: <FILE>