Development Setup

How to set up das-frontend for local development

Local Development

Clone the repository:

$ git clone https://github.com/DancesportSoftware/das-frontend.git

Switch to develop branch:

$ git checkout develop

Note: develop branch has the latest features that may not be in the master branch (which is for production use). If you are interested in developing a particular feature or issue, please look for branches that are related or create a new branch.

Install dependencies using Yarn

$ yarn install

Containerize with Docker

The front-end can be run with server-side rendering in Docker. SSR provides great advantage in many aspects. DAS comes with a default Dockerfile so you can build the project in Docker.

Since the base image we use is Alpine Linux, make sure that the Docker service on your local machine is configured to run Linux containers.

To build with Docker:

$ docker build -t das-frontend .

To run the docker image locally:

$ docker run -p 127.0.0.1:80:3000/tcp das-frontend:latest

This command will run the image that was built just now at port 80 (default port for HTTP) and forwards the traffic to container's port 3000, which is listened by nuxt start

Now open the web browser and visit localhost. DAS should be running there by now.

Clean up

Docker images can take a lot of space. To remove all your docker containers and images, run these commands:

Last updated