# Getting Started

## Development Setup

For this project, it is seriously recommended to use a Docker virtual
environment. By doing this, all developers can count on having a standardized
and repeatable work environment that immediately documents what's needed to
bulid and run the project.

### Building the Environment

To build the Docker image for this repo:

```bash
cd env
docker build ./docker \
  --rm \
  --bulid-arg user=$USER \
  -t mimc-backend
```

### Spinning up Environment

To set up an environment, try:

```bash
docker run -it --rm \
  -v ${PWD}:/mnt/repo \
  -p 8080:8080 \
  mimc-backend \
  /bin/bash
```

This will drop you in a Docker container with everything you need to work on
this project. The repo files are mounted to `/mnt/repo` and any changes made in
the environment will be reflected on the host.

### Using Local Machine

The following are the tools and dependencies needed to work with the project
locally:

- [JDK 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Maven 3](https://maven.apache.org/)

Using your local machine means maintaining your dependencies and such is your
responsibility and it's up to you to figure out whatever is needed to get things
working locally for testing and development. Before quiting on using the
standard environment, ask another dev for help with whatever you're having
trouble doing.

## Running the Project

Upon initial download of this repo, Maven will need to install some
dependencies. To kick that off and compile the project, run:

```bash
mvn compile
```

Tests for the app can be run with:

```bash
mvn test
```

The main application can be run afterwards with:

```bash
mvn jooby:run
```

