Skip to content

A super simple JS template for setting up React with Webpack and a separate Express server.

Notifications You must be signed in to change notification settings

MatthewCallis/javascript-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

# Run Docker in detached state
docker-compose up -d

# View Logs
docker-compose logs

Building Containers

Useful for debugging individual containers.

# 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 <ContainerID> /bin/bash

# View Logs
docker logs <ContainerID>

About

A super simple JS template for setting up React with Webpack and a separate Express server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published