Update README.md
This commit is contained in:
parent
22f3cbafb7
commit
5be6e14db9
40
README.md
40
README.md
@ -2,26 +2,30 @@
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
### Clone the `snowballtools-base` repo
|
- Clone the `snowballtools-base` repo
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:snowball-tools/snowballtools-base.git
|
git clone git@github.com:snowball-tools/snowballtools-base.git
|
||||||
cd snowballtools-base
|
cd snowballtools-base
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install dependencies in root
|
- Install dependencies in root
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build packages
|
- Build packages
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn build --ignore frontend
|
yarn build --ignore frontend
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration Files
|
Let us assume the following domains for backend and frontend
|
||||||
|
- Backend server: `api.snowballtools.com`
|
||||||
|
- Frontend app: `dashboard.snowballtools.com`
|
||||||
|
|
||||||
|
- Configuration Files
|
||||||
|
|
||||||
- For Backend:
|
- For Backend:
|
||||||
|
|
||||||
@ -29,17 +33,7 @@
|
|||||||
cp packages/backend/environments/local.toml.example packages/backend/environments/local.toml
|
cp packages/backend/environments/local.toml.example packages/backend/environments/local.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
- For Frontend:
|
- Production
|
||||||
|
|
||||||
```bash
|
|
||||||
cp packages/frontend/.env.example packages/frontend/.env
|
|
||||||
```
|
|
||||||
|
|
||||||
### Backend Production
|
|
||||||
|
|
||||||
- Let us assume the following domains for backend and frontend
|
|
||||||
- Backend server: `api.snowballtools.com`
|
|
||||||
- Frontend app: `dashboard.snowballtools.com`
|
|
||||||
|
|
||||||
- Update the following in backend [config file](packages/backend/environments/local.toml)
|
- Update the following in backend [config file](packages/backend/environments/local.toml)
|
||||||
|
|
||||||
@ -92,7 +86,7 @@
|
|||||||
gas = "750000"
|
gas = "750000"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backend Development
|
- Development
|
||||||
|
|
||||||
- Set `gitHub.oAuth.clientId` and `gitHub.oAuth.clientSecret` in backend [config file](packages/backend/environments/local.toml)
|
- Set `gitHub.oAuth.clientId` and `gitHub.oAuth.clientSecret` in backend [config file](packages/backend/environments/local.toml)
|
||||||
- [OAuth App Creation](https://github.com/organizations/<org>/settings/applications/new)
|
- [OAuth App Creation](https://github.com/organizations/<org>/settings/applications/new)
|
||||||
@ -154,12 +148,10 @@
|
|||||||
webhookUrl = "https://19c1-61-95-158-116.ngrok-free.app"
|
webhookUrl = "https://19c1-61-95-158-116.ngrok-free.app"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Frontend
|
- For Frontend:
|
||||||
|
|
||||||
- Change directory to `packages/frontend` in a new terminal
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd packages/frontend
|
cp packages/frontend/.env.example packages/frontend/.env
|
||||||
```
|
```
|
||||||
|
|
||||||
- Copy the GitHub OAuth app client ID from previous steps and set it in frontend [.env](packages/frontend/.env) file
|
- Copy the GitHub OAuth app client ID from previous steps and set it in frontend [.env](packages/frontend/.env) file
|
||||||
@ -175,11 +167,7 @@
|
|||||||
REACT_APP_GITHUB_IMAGE_UPLOAD_PWA_TEMPLATE_REPO = 'cerc-io/image-upload-pwa-example' # Set actual owner/name of the template repo that will be used for creating new repo
|
REACT_APP_GITHUB_IMAGE_UPLOAD_PWA_TEMPLATE_REPO = 'cerc-io/image-upload-pwa-example' # Set actual owner/name of the template repo that will be used for creating new repo
|
||||||
```
|
```
|
||||||
|
|
||||||
### Frontend Production
|
- Production
|
||||||
|
|
||||||
- Let us assume the following domains for backend and frontend
|
|
||||||
- Backend server: `api.snowballtools.com`
|
|
||||||
- Frontend app: `dashboard.snowballtools.com`
|
|
||||||
|
|
||||||
- Set the following values in [.env](packages/frontend/.env) file
|
- Set the following values in [.env](packages/frontend/.env) file
|
||||||
|
|
||||||
@ -209,7 +197,7 @@
|
|||||||
python3 -m http.server -d build 3000
|
python3 -m http.server -d build 3000
|
||||||
```
|
```
|
||||||
|
|
||||||
### Frontend Development
|
- Development
|
||||||
|
|
||||||
- Copy the graphQL endpoint from terminal and add the endpoint in the [.env](packages/frontend/.env) file present in `packages/frontend`
|
- Copy the graphQL endpoint from terminal and add the endpoint in the [.env](packages/frontend/.env) file present in `packages/frontend`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user