From 8ac1696ca088f0b3dabcd0063080b430c282dab6 Mon Sep 17 00:00:00 2001 From: Divlo Date: Tue, 4 Oct 2022 14:58:12 +0200 Subject: [PATCH] docs: add information for development --- .devcontainer/Dockerfile | 3 +-- .env.example | 13 +++++++------ CONTRIBUTING.md | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d56daef..1cd221e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,2 +1 @@ -ARG VARIANT="16" -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} +FROM mcr.microsoft.com/devcontainers/javascript-node:16 diff --git a/.env.example b/.env.example index 4da8377..9822413 100644 --- a/.env.example +++ b/.env.example @@ -1,21 +1,22 @@ -COMPOSE_PROJECT_NAME=thream-api -NODE_ENV=development API_URL=http://localhost:8080 -HOST=0.0.0.0 -PORT=8080 +COMPOSE_PROJECT_NAME=thream-api DATABASE_URL=postgresql://user:password@thream-database:5432/thream +DISCORD_CLIENT_ID= +DISCORD_CLIENT_SECRET= EMAIL_HOST=thream-maildev EMAIL_PASSWORD=password EMAIL_PORT=25 EMAIL_USER=no-reply@thream.fr FILE_UPLOADS_API_KEY=apiKeySecret FILE_UPLOADS_API_URL=http://host.docker.internal:8000 -DISCORD_CLIENT_ID= -DISCORD_CLIENT_SECRET= GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= +HOST=0.0.0.0 JWT_ACCESS_EXPIRES_IN=15 minutes +# You can generate JWT secrets with the `npm run generate:jwt-secret` command. JWT_ACCESS_SECRET=accessTokenSecret JWT_REFRESH_SECRET=refreshTokenSecret +NODE_ENV=development +PORT=8080 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 995bc8c..5f27a7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,9 +58,9 @@ Scopes define what part of the code changed. ### Examples ```sh -git commit -m "feat(services): add POST /users/signup" +git commit -m "feat: add POST /users/signup" git commit -m "docs(readme): update installation process" -git commit -m "fix(services): should emit events to connected users" +git commit -m "fix: should emit events to connected users" ``` ## Directory Structure @@ -120,3 +120,5 @@ The folders after `src/services` : is the real path of the routes in the API exc folders starting and ending with `__` like `__test__` or `__utils__`. The filenames correspond to the HTTP methods used (`get`, `post`, `put`, `delete`). + +You can generate the boilerplate code for a new service with the `npm run generate` command.