https://github.com/matthewcallis/javascript-starter
A super simple JS template for setting up React with Webpack and a separate Express server.
https://github.com/matthewcallis/javascript-starter
Last synced: 11 months ago
JSON representation
A super simple JS template for setting up React with Webpack and a separate Express server.
- Host: GitHub
- URL: https://github.com/matthewcallis/javascript-starter
- Owner: MatthewCallis
- Created: 2021-12-14T20:49:23.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-16T15:40:19.000Z (over 3 years ago)
- Last Synced: 2025-01-05T23:41:23.079Z (about 1 year ago)
- Language: JavaScript
- Size: 288 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple React & Webapck with Express Server
The goal is to have a small but extensible app setup.
This is not, nor does it intended to be "production ready"; `npm start` is used from Docker rather than `dumb-init`, development dependencies are installed, image is not pinned, etc.
## Running
```sh
# Run Docker in detached state
docker-compose up -d
# View Logs
docker-compose logs
```
## Building Containers
Useful for debugging individual containers.
```sh
# Setup the Client (React & Webpack) Container
cd client
docker build -f Dockerfile -t simple:client .
docker run -it -p 8080:8080 simple:client
open http://localhost:8080/
# Setup the Server (Express) Container
cd server
docker build -f Dockerfile -t simple:server .
docker run -it -p 3000:3000 simple:server
curl -i localhost:3000
# General Docker Tips
# -it is short for --interactive --tty
# Get Container ID
docker ps
# Enter the Container
$ docker exec -it /bin/bash
# View Logs
docker logs
```