Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 2.89 KB

README.md

File metadata and controls

60 lines (37 loc) · 2.89 KB

ODK Central Frontend

Platform License Build status

ODK Central Frontend uses Vue.js to provide the frontend for ODK Central. It is currently under development.

Setting up your development environment

First, install Node.js 12+.

Next, install dependencies by running npm install.

Install NGINX. Depending on your operating system and how you install NGINX, you may need to change the absolute paths in ODK Central Frontend's nginx.conf.

You will also need to set up ODK Central Backend.

Running in development

Follow these instructions to run ODK Central Frontend in development. For deploying to production, see the next section.

First, run ODK Central Backend.

Next, build ODK Central Frontend files for development by running npm run dev. The files will be outputted to dist/. As you update the source code, the files will be automatically rebuilt.

Finally, run NGINX by changing the working directory to the root directory of the repository, then typing the following:

nginx -c "$PWD/nginx.conf" -p "$PWD/dist/"

We specify -p "$PWD/dist/" so that relative paths in nginx.conf are relative to dist/.

NGINX effectively places ODK Central Frontend and ODK Central Backend at the same origin, avoiding cross-origin requests.

ODK Central Frontend will be available on port 8989.

Deploying to production

To build ODK Central Frontend files for production with minification, run npm run build. The files will be outputted to dist/. For more details on this command, see the documentation for Vue CLI.

For more information on deploying to production, see the ODK Central repository.

Testing

To run unit tests, type npm run test.

For linting, run npm run lint. We use rules based on the Airbnb JavaScript style guide.