-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from fullstack-development/v5
V5
- Loading branch information
Showing
191 changed files
with
7,461 additions
and
24,976 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
**/node_modules | ||
**/dist | ||
**/build | ||
api/.prisma-lib | ||
.git | ||
node_modules | ||
dist | ||
typeorm.env | ||
api.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
node_modules/ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
.vscode | ||
yarn-error.log | ||
.env | ||
.e2e.env | ||
|
||
*/**/node_modules_docker_dev | ||
*/**/.ignore | ||
.env | ||
typeorm.env | ||
api.env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1 @@ | ||
# Starter kit Node js | ||
|
||
## Links | ||
|
||
1. [API doc](./api/Readme.md) | ||
|
||
## Preparations | ||
### Installation | ||
|
||
Do installations step by step: | ||
|
||
1. Install dependencies for `api` | ||
|
||
```bash | ||
cd ./api | ||
yarn | ||
``` | ||
|
||
The postinstall script will generate prisma types for you | ||
|
||
`On windows can be not work auto generating prisma schema. You can manual copy schema.prisma in api/src/schema.prisma` | ||
|
||
2. Then install dependencies for `e2e` | ||
|
||
```bash | ||
cd ./e2e | ||
yarn | ||
``` | ||
|
||
The postinstall script will generate prisma types for you | ||
|
||
`On windows can be not work auto generating prisma schema. You can manual copy schema.prisma in e2e/src/schema.prisma` | ||
|
||
### Launch | ||
|
||
#### Local with docker | ||
|
||
1. Run docker containers via docker-compose from the root folder of the repository | ||
|
||
```bash | ||
docker compose -f stk.docker-compose.yaml up -d --build | ||
``` | ||
|
||
2. Go to `api/env` folder and create copy of `dev.example.env` to `dev.env` | ||
```bash | ||
cd ./api/env | ||
cp ./dev.example.env ./dev.env | ||
``` | ||
3. Copy `schema.prisma` from root dir in `api/src/schema.prisma` | ||
4. Go up to `api` and launch migrations | ||
```bash | ||
cd ../ | ||
source ./env/dev.env && DATABASE_URL=$DATABASE_URL yarn prisma:migrate:deploy | ||
``` | ||
- Press `Yes (y)` if it asks you to install missed dependencies | ||
# Starter kit Node js V5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-alpine3.18 AS dependencies | ||
RUN npm install -g pnpm | ||
USER node | ||
RUN mkdir -p /home/node/app | ||
WORKDIR /home/node/app | ||
COPY --chown=node . . | ||
RUN pnpm i | ||
|
||
FROM dependencies AS build | ||
WORKDIR /home/node/app | ||
RUN pnpm run api:build | ||
|
||
FROM node:18-alpine3.18 | ||
RUN npm install -g pnpm | ||
USER node | ||
RUN mkdir -p /home/node/app | ||
WORKDIR /home/node/app | ||
COPY --chown=node --from=build /home/node/app . | ||
CMD ["pnpm", "run", "api:prod"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PORT=3000 | ||
|
||
DB_NAME="stk_db" | ||
DB_HOST="localhost" | ||
DB_USERNAME="admin" | ||
DB_PASSWORD="1234" | ||
DB_PORT=5432 | ||
DOMAIN=https://localhost | ||
|
||
JWT_SECRET="123" | ||
JWT_EXPIRES_IN="2min" | ||
JWT_REFRESH_SECRET="321" | ||
JWT_REFRESH_EXPIRES_IN="2days" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.