- fields are multiselect when Residence and From/TO language single select
- Users can choose more than one From/To language pairs
- Display default data for word_count and whatsapp fields
- Rewrite terms and translate
- Allow users to select language for interface and terms
5. Language pair to and from must not be the same > uses validation
Serves application form and handles saving of submitted data into MongoDB database.
Form is built form JSON Schema - public/schema.json
using Alpaca/jQuery and Bootstrap CSS.
Backend is built using koa
Node.js framework.
App is started by running npm start
script.
$ npm start
App requires two environment variables to be set:
- PORT The port number server will listen to (default: 4000)
- MONGODB_URI URI to MongoDB to save form to
When deploying to Heroku with mLab add-on, both variables are set by Heroku.
To run locally, set MONGODB_URI variable to your connection string
$ MONDODB_URI=mongodb://user:password@host:port/database npm start
Form fields can be updated and re-ordered by modifying JSON Schema for the data in
public/schema.json
file.
Field 'widgets' are controlled by the options
parameter to alpaca()
in the index.html
file.
Currently form uses multiselect
, url
and country
field types. There are several more field types
provided by Alpaca. Read http://alpacajs.org/documentation.html for details.
App can be deployed to Heroku without additional configuration. Make sure you have mLab add-on installed, and that MONGODB_URI environment variable is available. This can be checked using Heroku CLI:
$ heroku config:get MONGODB_URI
This tutorial describes how to set up BitBucket Pipelines to push to Heroku: https://confluence.atlassian.com/bitbucket/deploy-to-heroku-872013667.html
Other CI/build tools can be setup similarly