Skip to content

Commit

Permalink
Merge branch 'main' into ermish/dockerbiuld
Browse files Browse the repository at this point in the history
  • Loading branch information
ermish authored Sep 10, 2023
2 parents bd73961 + 3bf64a5 commit ce2c551
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ We love and welcome contributions to our front-end repository which can be found

## Prerequisites

- [Node](https://nodejs.org)
- We recommend using [nvm](https://github.com/nvm-sh/nvm) and running `nvm use` in this directory to sync with the project's Node version. However, if you wish to install Node your own way and ensure a consistent version with `.nvmrc`, that's fine too
- [Yarn Berry](https://yarnpkg.com/getting-started/install)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- [Node](https://nodejs.org)
- We recommend using [nvm](https://github.com/nvm-sh/nvm) and running `nvm use` in this directory to sync with the project's Node version. However, if you wish to install Node your own way and ensure a consistent version with `.nvmrc`, that's fine too
- [Yarn Berry](https://yarnpkg.com/getting-started/install)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)

# Setup

Expand Down Expand Up @@ -75,10 +75,13 @@ npm -g i firebase-tools
#### a.2 Install Java

on a mac, we recommend using [homebrew](https://brew.sh/)

```sh
brew install java
```

on a windows pc, we recommend using [chocolatey](https://chocolatey.org/)

```sh
choco install java
```
Expand All @@ -103,6 +106,12 @@ Select "Use an existing project"
yarn dev:startlocaldb
```

### 3.c Starting the dev server and seeding the emulator

```sh
yarn dev
```

This will run until you shut down the instance hitting `ctrl^+C`

### (Optional) Connecting to Production database
Expand Down Expand Up @@ -140,7 +149,7 @@ yarn prod

This runs locally and can easily be debugged with vscode!
Click on the `Run and Debug` vscode tab, and then choose `Javascript Debug Terminal`, then run `yarn dev` in there and the debugger will automatically connect.
Then, just add breakpoints by clicking on the line number of your code.
Then, just add breakpoints by clicking on the line number of your code.

# How to Test your code

Expand All @@ -153,17 +162,17 @@ Then, just add breakpoints by clicking on the line number of your code.
npm install jest --global
```

2. Start the Docker container:
2. Start the Docker container:

```sh
yarn test:dockerstart
```

3. Run the tests:
```sh
yarn test:dockerstart
```

```sh
yarn test
```
3. Run the tests:

```sh
yarn test
```

</details>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "echo '\n🧶 Installing yarn dependencies...🧶\n' && yarn && yarn generate && yarn dev:startserver",
"dev:startserver": "echo '\n💻 💻 💻✨ Starting dev server...' && cross-env NODE_ENV=development ts-node-dev --no-notify --exit-child src/index.ts",
"dev:startlocaldb": "firebase login && firebase emulators:start --only firestore",
"dev:startlocaldb": "firebase login && firebase --project=find-a-doc-japan emulators:start --only firestore",
"test": "jest --runInBand --detectOpenHandles --forceExit --setupFiles",
"test:dockerstart": "docker-compose -f 'docker/docker-compose-test.yml' up -d --build",
"test:dockerstop": "docker-compose -f 'docker/docker-compose-test.yml' down",
Expand Down

0 comments on commit ce2c551

Please sign in to comment.