This is a sample project how to use cage1016/gokit-todo as a generic Back End for any prototype or any Front End that needs a simple Back End.
This is a modified version of original ttu/todomvc-fake-server: Redux TodoMVC example converted to use Fake JSON Server as a Back End.
- Clone source code from github
git clone https://github.com/cage1016/gokit-todo-frontend.git cd gokit-todo-frontend
- Prepare backend api
cat <<EOF >> docker-compose.yaml version: '3.1' networks: todo: driver: bridge services: todo: image: index.docker.io/cage1016/gokit-todo:latest depends_on: - db ports: - "10120:10120" environment: QS_DB_HOST: db QS_DB_PORT: 5432 QS_DB_USER: postgres QS_DB_PASS: password QS_DB: todo restart: on-failure networks: - todo db: image: postgres:latest restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_DB: todo networks: - todo EOF docker-compose up -d
- Start frontend
yarn && yarn start
- Open http://localhost:3000
- Clear backend API
docker-compose down --volumes