Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Feat: Added environment variables support #11

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_API_BASE_URL=http://localhost:5000
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Parachute By OpenRegistry

## What is this project:

Parachute is the frontend for [OpenRegistry](https://github.com/containerish/OpenRegistry), which is used for
managing your container images in an easy to use UI.


## How to run this project locally?

This project is built using React (create-react-app), which means most of the dev/build process is similar to any React
Application out there. However, there's a minor difference. We use `.env` file for loading the base url for our backend.
This helps us manage the backend that the frontend will use in an easy way. Here's what must be done to run this project
locally:

1. Clone this project:
```sh
git clone https://github.com/containerish/parachute-ui.git
```

2. Install all the required dependencies:
```sh
npm install # or yarn install
```

3. Make a copy of the `env.example` file:
```sh
cp env.example .env
```

> Note that here you must make sure you have the **OpenRegistry Backend** running on your local system.
If you follow [this official link](https://github.com/containerish/OpenRegistry), you can find the instructions on
how to run it.

4. Finally, run the application:
```sh
npm start # or yarn start
```
2 changes: 1 addition & 1 deletion src/pages/landingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function LandingPage() {
"email": email
}

axios.post('https://beta.openregistry.dev/beta/register', body)
axios.post(`${REACT_APP_API_BASE_URL}/beta/register`, body)
.then(response => {
setResp(response.data.message)
setIsError(false)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/landing_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function LandingPage() {
"email": email
}

axios.post('https://beta.openregistry.dev/beta/register', body)
axios.post(`${REACT_APP_API_BASE_URL}/beta/register`, body)
.then(response => {
setResp(response.data.message)
setIsError(false)
Expand Down