Confirmed users
1,927
edits
No edit summary |
|||
Line 65: | Line 65: | ||
For rapid development, we can use web.py itself with its built-in development web server to serve both the REST API and the static files. However, out of the box, web.py wants all static files in a static/ subdirectory, so we will need to hack around that. The advantage, however, of having the APIs be in a subdirectory off the application root means that everything is agnostic as to the absolute path on the server. All AJAX calls should be to the relative path "api/", so it doesn't matter if the full path is http://localhost:7890/ during development and http://server/toolfoo/ when deployed. | For rapid development, we can use web.py itself with its built-in development web server to serve both the REST API and the static files. However, out of the box, web.py wants all static files in a static/ subdirectory, so we will need to hack around that. The advantage, however, of having the APIs be in a subdirectory off the application root means that everything is agnostic as to the absolute path on the server. All AJAX calls should be to the relative path "api/", so it doesn't matter if the full path is http://localhost:7890/ during development and http://server/toolfoo/ when deployed. | ||
=== Databases === | |||
We have two recommended databases: | |||
* MySQL: A Web standard and hosted locally. | |||
* ElasticSearch: Very fast for searching, hosted by the metrics team--though we could talk about setting up our own local server, if needed. | |||
Nonstandard dbs, like CouchDb, are not recommended unless there is a very good reason. | |||
A random tip for database structures: store timestamps in UTC! It is much easier to deal with than most other time zones, particularly because there is no DST. | |||
== Client Architecture == | == Client Architecture == |