Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
install part updated. .env file description for client folder provided.
  • Loading branch information
frknlke authored May 12, 2023
1 parent 16f0ba7 commit 58f88ad
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions practice-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

## Dependencies

To install dependencies of the project, please go into both `client` and `server` directories and run `npm install` command in both directories.

If you cannot run `npm` command install [Node.js](https://nodejs.org/). LTS version is recommended.
In pre-run phase all you need is install [docker](https://docs.docker.com/engine/install/).

After that, you can follow instructions provided in `README.md` files in `client` and `server` directories to run development servers for both `client` and `server`.

## Running the project
1. You need a MongoDB instance. Please copy the MongoDB URI.
2. Create a `.env` file in the `server` and `client` folders. It should contain the following fields:
2. Create a `.env` file in the `server`. It should contain the following fields:

```json
PORT =
Expand All @@ -23,9 +21,14 @@ After that, you can follow instructions provided in `README.md` files in `client
LOCATION_TOKEN =
MOBY_API_KEY =
```
3. Create a `.env` file in the `client`. It should contain the following field:

```json
API_URL =
```



3. Install [docker](https://docs.docker.com/engine/install/).
4. After adding the .env file, you can run `docker-compose up --build -d` in `server` folder.
5. To build the backend image run `sudo docker build -t practice-app-backend`, and to build the frontend image run `sudo docker build -t practice-app-frontend`,
6. Run `sudo docker run -d -p 8080:8080 practice-app-backend` for backend and `sudo docker run -d -p 3000:3000 practice-app-frontend` for frontend.
7. That is all.
4. To build the backend image run `sudo docker build -t practice-app-backend`, and to build the frontend image run `sudo docker build -t practice-app-frontend`,
5. Run `sudo docker run -d -p 8080:8080 practice-app-backend` for backend and `sudo docker run -d -p 3000:3000 practice-app-frontend` for frontend.
6. That is all.

0 comments on commit 58f88ad

Please sign in to comment.