https://github.com/caub/flask-geo
small webapp for searching geographic-content
https://github.com/caub/flask-geo
Last synced: 3 months ago
JSON representation
small webapp for searching geographic-content
- Host: GitHub
- URL: https://github.com/caub/flask-geo
- Owner: caub
- Created: 2012-12-27T13:54:23.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-06T02:32:59.000Z (over 13 years ago)
- Last Synced: 2025-01-28T02:11:14.636Z (over 1 year ago)
- Language: Python
- Size: 262 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
myMap_python
============
small webapp sample for geographic Blogging, forked from https://github.com/mitsuhiko/flask/tree/master/examples/flaskr
What is it using?
----
It's a [flask](http://flask.pocoo.org/) based application
the ORM is using sqlite right now, but other possible (NoSQL) databases are being added
the current SQL queries don't rely on SQL specificities, it uses [geocell lib](http://code.google.com/p/geomodel/source/browse/trunk/geo/geomodel.py?r=20) (see utils/geocell) for 2D map queries, and a combinatorial (see utils/__init__) function for categories queries
How do I use it?
---
- open a python shell and run this:
`>>> from myMap import create_db; create_db()`
- now you can run `python myMap.py`
the application will greet you on [http://localhost:5000](http://localhost:5000/)
Is it tested?
---
Run `myMap_tests.py` file to see the tests pass.
[Deploy](http://flask.pocoo.org/docs/deploying/mod_wsgi/#creating-a-wsgi-file) it
----
Simplest way to run it as a wsgi application is with Apache: just install mod_wsgi, and add in your VirtualHost config:
```
WSGIDaemonProcess myMap user=cab group=cab threads=5
WSGIScriptAlias /geo /home/cab/git/myMap/myMap.wsgi
WSGIProcessGroup myMap
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
```
- edit:
a nodejs server is used for websockets
requires to install nodejs, npm, and install node's package socket.io
make apache run on a different port than 80, adjust the routing in node-ws.js
and run `sudo node node-ws.js`