| path to file | path to text | current text |
|---|---|---|
/package.json |
$.name |
"eco-monorepo" |
/package.json |
$.author |
"Dmytro Parzhytskyi <parzhitsky@gmail.com>" |
/package.json |
$.repository |
"https://github.com/eco-repositories/eco-monorepo" |
/package-lock.json |
$.name |
"eco-monorepo" |
/package-lock.json |
$.packages[""].name |
"eco-monorepo" |
/packages/client/index.html |
html>head>title |
"Client App" |
Starting the application stack with npm start is the simplest approach and also recommended.
-
Set environment variables and build arguments in
/docker-compose.env.localRead
/docker-compose.yamlfor the variables it uses. Also, normally, Docker produces a warning message for variables that are not set.- (optionally) Copy the example file
/docker-compose.env.local.exampleas/docker-compose.env.local. Beware that the example file might be out of sync with the actual env variables used by Docker Compose.
- (optionally) Copy the example file
-
Run application stack:
npm start
- (optionally) To run the application stack in development mode (with development overrides applied), copy the example file
/docker-compose.override.yaml.exampleas/docker-compose.override.yaml. If present, this new file will automatically be picked up by Docker Compose, and all the specified overrides will be applied.
- (optionally) To run the application stack in development mode (with development overrides applied), copy the example file
-
Observe the apps:
-
serveronhttp://localhost:<SERVER_PORT_HOST>(tryGET /v1/health) -
clientonhttp://localhost:<CLIENT_PORT_HOST>
-
-
(optionally) Stop the application stack:
npm stop
To start the application stack without Docker, it is necessary to setup/build/start the applications manually on localhost, then run server in the background, then run client in "dev" mode.
-
Install all dependencies:
npm ci
-
Build
sharedpackage (it has to be built first because the other packages depend on it):npm run -w shared build
-
Set server port as
PORTenvironment variable in/packages/server/.env.local:echo PORT='<SERVER_PORT>' >> ./packages/server/.env.local
-
Build server:
npm run -w server build
-
Start server:
npm run -w server start
-
Share server location with the client through
/packages/client/.env.local:echo VITE_SERVER_BASE_URL='http://localhost:<SERVER_PORT>' >> ./packages/client/.env.local
-
Start client (in
devmode):npm run -w client dev
-
Observe the apps:
-
serveronhttp://localhost:<SERVER_PORT> -
clientonhttp://localhost:<CLIENT_PORT>(usually it ishttp://localhost:5173/)
-
-
(optionally) Stop the application stack:
-
Stop the client (press Q in the client terminal)
-
Stop the server (press Ctrl+C in the server terminal)
-