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

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.

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
```