Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skngetich/nginx-test-app

The project demonstrates a seamless and efficient approach to proxying web requests through subdomains. The combination of the 'react-app' and 'nginx' containers ensures a well-organized and scalable architecture for handling different aspects of the application's functionality.
https://github.com/skngetich/nginx-test-app

docker docker-compose nginx react

Last synced: 15 days ago
JSON representation

The project demonstrates a seamless and efficient approach to proxying web requests through subdomains. The combination of the 'react-app' and 'nginx' containers ensures a well-organized and scalable architecture for handling different aspects of the application's functionality.

Awesome Lists containing this project

README

        

# Nginx Test App

This project is to reproduce proxying web requests using a subdomain in the URL i.e. `example.com/subdomain/`.
The application used 2 docker containers: 'react-app' and 'nginx'. 'react-app' is the frontend application server using expressjs and the nginx is the web server serving the request.

## Available Scripts

### Start docker

```bash
docker-compose pull # pull docker images from registry
docker-compose build # builds the react app
docker-compose up # starts the two containers

```

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)