Giter VIP home page Giter VIP logo

enketo-dev's Introduction

๐Ÿฆจ

this is not an official kobotoolbox repository, okay?

enketo-dev

have your Enketo and develop it, too!

goal

As a developer, I would like to run things I don't change inside Docker (KoboToolbox and associated databases, and Redis). I would like full, manual control over running code that I do change (Enketo Express). I would like simplicity in configuration with sensible defaults and a minimum of mandatory customization. If this sounds like a topsy-turvy kobo-no-docker, that's because it is :)

getting started

  1. clone this repository
  2. execute first-run.sh, which will:
    • pull docker images
    • start databases
    • run kpi and kobocat database migrations
    • prompt you to create a superuser
    • remind you that you shouldn't test things as a superuser :)
  3. docker-compose up, which should yield:
    • kpi running on 10.6.7.1:8006
    • kobocat running on 10.6.7.1:8007
    • postgres, on 10.6.7.1:60666
    • redis, on 10.6.7.1:60667
    • mongo, on 10.6.7.1:60668
  4. set up an Enketo (javascript) development environment!
    1. clone https://github.com/enketo/enketo-express
    2. ๐ŸŽฏ copy the file enketo-config.json to config/config.json inside your enketo-express clone
    3. cd into your enketo-express source directory
    4. nvm use 16, or whatever you cool kids like
    5. important: npm install -g npm@6 (why?)
    6. npm install
      • don't be surprised if "extract:rxjs" appears to be stuck for seven or more minutes
    7. npx grunt develop
    8. now Enketo should be running on port 8005 (at 10.6.7.1 as well as all your other IPs!)
  5. test it out
    1. log into kpi at http://10.6.7.1:8006/
    2. create and deploy a new form
    3. verify that it opens in Enketo
    4. make some change to Enketo: for example, modify console.log('autosave successful') in public/js/src/module/controller-webform.js
    5. watch for Enketo to automatically reload with your changes

hints

  • django is set to use the console email backend, so you can do things like create user accounts and read the activation email details right from the logs of the kpi container, i.e. docker-compose logs -f kpi

nasties

  • some things just don't work without nginx (like serving attachments? need to confirm)

enketo-dev's People

Contributors

jnm avatar p2edwards avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.