Skip to content

Commit

Permalink
Update server launch commands and add console log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanCDev committed Feb 14, 2024
1 parent 390a1af commit 53b0107
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ yarn ios
yarn android
```

To launch the server you'll need to do various things :

- First go to the server folder, then :

```sh
yarn install
cd libs/prisma/schema/base && npx prisma generate
cd ../translator && npx prisma generate
cd ../logs && npx prisma generate
cd ../../../../
docker compose up postgres
npx prisma migrate deploy --schema libs/prisma/schema/base/prisma/schema.prisma
nx serve api
```

## Tests

Tests are done with [Jest](https://jestjs.io/)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ios": "react-native run-ios",
"start": "react-native start",
"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",
"start-server": "cd ../NoLoBack && docker compose up",
"start-server": "cd ../MonoLoBack && nx serve api",
"android-release": "cd android && ./gradlew assembleRelease && echo 'apk is in android/app/build/outputs/apk/release'",
"lint": "eslint '**/*.{tsx,ts,jsx,js}' --config './.eslintrc.js' --fix-dry-run",
"documentation": "typedoc --options ./typedoc.json",
Expand Down
1 change: 1 addition & 0 deletions src/helpers/httpClient/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export function requestServer({
let finalURL
if (url === PROD_API_URL && __DEV__) finalURL = DEV_API_URL
else finalURL = url
if (__DEV__) console.log('finalURL:', finalURL + endpoint)

Check warning on line 110 in src/helpers/httpClient/common.ts

View workflow job for this annotation

GitHub Actions / linting / front-end-linting

Unexpected console statement
return fetch(finalURL + endpoint, {
method,
headers: {
Expand Down

0 comments on commit 53b0107

Please sign in to comment.