Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benruehl/react-express-exercise
An exercise consisting of a react client and an express server interacting with the GitHub API
https://github.com/benruehl/react-express-exercise
express github-api react redux typescript
Last synced: 19 days ago
JSON representation
An exercise consisting of a react client and an express server interacting with the GitHub API
- Host: GitHub
- URL: https://github.com/benruehl/react-express-exercise
- Owner: benruehl
- License: mit
- Created: 2019-05-18T09:32:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T21:14:23.000Z (over 5 years ago)
- Last Synced: 2024-11-04T14:51:05.409Z (2 months ago)
- Topics: express, github-api, react, redux, typescript
- Language: TypeScript
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-express-exercise
An exercise consisting of a react client and an express server interacting with the GitHub API
## Prerequisites
- [Node.js](https://nodejs.org/en/) installed (tested with v10)
- [npm](https://www.npmjs.com/) installed (tested with v5.3)## Installation of backend
1. Go to backend directory
```sh
cd express-backend
```2. Install project dependencies
```sh
npm install
```3. Compile sources
```sh
npm run build
```4. Start application
```sh
npm start
```## Installation of frontend
1. Go to backend directory
```sh
cd react-frontend
```2. Install project dependencies
```sh
npm install
```3. Start application
```sh
npm start
```## Configuration
Frontend and backend both support configuration via environment variables.
**Backend**
- `PORT` - The port of the application (default is `4000`)**Frontend**
- `PORT` - The port of the application (default is `3000`)
- `REACT_APP_BACKEND_URL` - The base url of the backend application (default is `http://localhost:4000/api/v1`)How their values are set depends on the terminal used, e.g.:
**Powershell**
```sh
$env:PORT = '5000'; npm start
```**Bash**
```sh
PORT=8000 npm start
```