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

Commit

Permalink
Merge pull request #11 from containerish/env-vars
Browse files Browse the repository at this point in the history
Feat: Added environment variables support
  • Loading branch information
jay-dee7 authored Oct 19, 2021
2 parents ec0f493 + 3f046d3 commit 6ddf05e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
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

0 comments on commit 6ddf05e

Please sign in to comment.