-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the usage part #152
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,8 +169,9 @@ mounted from the host i.e. changes made on the host are immediately reflected in | |
the VM and vice versa. This allows you to work on the code either on the host or | ||
in the VM according to your preference. | ||
|
||
Usage | ||
_____ | ||
|
||
Usage for VM | ||
____________ | ||
|
||
.. note:: | ||
When using a virtual machine, run the following commands in the VM. | ||
|
@@ -189,19 +190,61 @@ Then upload the `waterpoint data`_: :: | |
|
||
python manage.py upload_waterpoints <path/to/waterpoints/file.csv> | ||
|
||
Start the application from the TaarifaWaterpoints directory by running: :: | ||
|
||
python manage.py runserver -r -d | ||
|
||
By default the API server is only accessible from the local machine. If access | ||
from the outside is required (e.g. when running from inside a VM), run: :: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you could also say "Since the server is running inside the, access from the host is required ..." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i can update the windows and linux usage guide |
||
|
||
python manage.py runserver -h 0.0.0.0 -r -d | ||
|
||
|
||
The flags ``-r`` and ``-d`` cause the server to run in debug mode and reload | ||
automatically when files are changed. | ||
|
||
To verify things are working, open a browser (on the host and when using the VM) | ||
and navigate to: :: | ||
|
||
http://localhost:5000/api/waterpoints | ||
|
||
This should show a list of all the waterpoint resources currently in the | ||
database. | ||
|
||
To work on the frontend web application start the `grunt` server (with the API | ||
server running on port 5000) using: :: | ||
|
||
grunt serve --watch | ||
|
||
Then navigate to (on the host and when using the VM): :: | ||
|
||
http://localhost:9000 | ||
|
||
|
||
Usage for windows and Linux | ||
___________________________ | ||
|
||
.. note:: | ||
When using a virtual machine, run the following commands in the VM. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is now for the non-VM case this note is no longer necessary. |
||
|
||
Make sure the virtualenv is active: :: | ||
|
||
workon TaarifaAPI | ||
|
||
From the TaarifaWaterpoints directory run the following commands to | ||
create the waterpoint schemas: :: | ||
|
||
python manage.py create_facility | ||
python manage.py create_service | ||
|
||
Then upload the `waterpoint data`_: :: | ||
|
||
python manage.py upload_waterpoints <path/to/waterpoints/file.csv> | ||
|
||
Start the application from the TaarifaWaterpoints directory by running: :: | ||
|
||
python manage.py runserver -r -d | ||
|
||
The flags ``-r`` and ``-d`` cause the server to run in debug mode and reload | ||
automatically when files are changed. | ||
|
||
To verify things are working, open a browser (on the host when using the VM) | ||
To verify things are working, open a browser (on the host and when using the VM) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now grammatically incorrect. |
||
and navigate to: :: | ||
|
||
http://localhost:5000/api/waterpoints | ||
|
@@ -214,7 +257,7 @@ server running on port 5000) using: :: | |
|
||
grunt serve --watch | ||
|
||
Then navigate to (on the host when using the VM): :: | ||
Then navigate to (on the host and when using the VM): :: | ||
|
||
http://localhost:9000 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is VM specific, you can just say "Run the following commands in the VM:"