-
Notifications
You must be signed in to change notification settings - Fork 40
RapidPro Dev Mode
Nic Pottier edited this page Feb 8, 2021
·
2 revisions
Running the flow editor in dev mode for RapidPro is possible but requires some specific settings. You will need to run nginx as a proxy.
Configured nginx as follows (rapidpro.conf):
upstream mailroom {
server localhost:8090 max_fails=0;
}
upstream courier {
server localhost:8080 max_fails=0;
}
upstream rapidpro {
server localhost:8000 max_fails=0;
}
upstream floweditor {
server localhost:3000 max_fails=0;
}
server {
listen 8888;
location ~ /mr/ {
proxy_pass http://mailroom;
}
location ~ /c/ {
proxy_pass http://courier;
}
location ^~ /static/media {
proxy_pass http://floweditor;
}
location ~ /asset-manifest\.json|sockjs|.*webpack|dev/(.*) {
proxy_pass http://floweditor/$1;
}
location ~ /.+ {
add_header Access-Control-Allow-Origin *;
proxy_set_header Host $http_host;
proxy_pass http://rapidpro;
}
}
-
Set
EDITOR_DEV_MODE = True
in yoursettings.py
(or setRAPIDPRO_EDITOR_DEV_MODE
toTrue
) -
Start mailroom on default port (make sure docs are copied in to base dir from recent release, test by going to
/mr/docs/
)) -
Start courier on default port if you plan on sending/receiving messages
-
Start rapidpro on default port
-
Start floweditor in dev mode:
yarn start
You should be able to edit/dev on editor now on flow editor page. Check network request log in chrome if it doesn't work.