Skip to content

A simple isomorphic Miso app development server using Stack and Docker

License

Notifications You must be signed in to change notification settings

tneisinger/miso-stack-docker

Repository files navigation

Miso Isomorphic Example using Docker and Stack

Run a simple isomorphic Miso app inside a docker container. Code changes will automatically trigger the server to rebuild and restart, so your changes will be viewable after a browser refresh.

This repo borrows heavily from the very helpful Tehnix/miso-isomorphic-stack repo, which itself is based on this Miso example.

The goal here is to create a simple editor-agnostic development environment for an isomorphic Miso app that will be easy to deploy. I also wanted to avoid using Nix, since I'm already familiar with Stack.

This is a work-in-progress, so suggestions are welcome.

Prerequisites

You will need to have docker installed on your system. This repo was built using docker version 18.09.1.

Clone and Build

Clone this repo and run build-docker-image.sh:

git clone https://github.com/tneisinger/miso-stack-docker
cd miso-stack-docker
./build-docker-image.sh

Note: Running build-docker-image.sh will take a long time.

Run It!

To start the app, simply run:

./start-container.sh

This will start a docker container based on the docker image that was built by build-docker-image.sh. This docker container will automatically run reloader.sh, which is responsible for running the app server, as well as rebuilding and restarting the server on code changes.

Go to http://localhost:3003 in your browser to see the result.

Areas For Improvement

  • It's great that the server automatically rebuilds and restarts on code changes, but it's not so great that it does it so slowly. In the worst case, this process has taken up to 16 seconds on my machine!

About

A simple isomorphic Miso app development server using Stack and Docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published