https://github.com/ultrafunkamsterdam/monocle-rm-front
A Rocketmap Monocle frontend implementation. This has to be used together with my Monocle Repo (only postgres support!)
https://github.com/ultrafunkamsterdam/monocle-rm-front
Last synced: 2 months ago
JSON representation
A Rocketmap Monocle frontend implementation. This has to be used together with my Monocle Repo (only postgres support!)
- Host: GitHub
- URL: https://github.com/ultrafunkamsterdam/monocle-rm-front
- Owner: ultrafunkamsterdam
- License: mit
- Created: 2017-08-23T07:38:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-12T10:44:51.000Z (about 8 years ago)
- Last Synced: 2025-06-19T22:03:33.998Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.58 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monocle-RM-Front
A Rocketmap Monocle frontend implementation. This has to be used together with my Monocle Repo (only postgres support!)# After this beautiful image, there is a short howto on installation
Screenshot:
![alt text][logo]# Install:
Clone the repo
Change api/raw_data.php -> first block of code (valid referers and cors) : replace yoursite.tld with your actual site.
Change api/config.php -> change your postgres db credetialsIn case you use nginx, this is a working snippet to put in your server directive:
```
#
# This is the location block managing requests for uri's /raw_data and /gym_data
#
location /api {
# this is also set in php, but it can't do harm to also set it in nginx
# you can set multiple valid referers.
valid_referers yoursite.tld www.yoursite.tld ;
if ($invalid_referer) {
# you can choose to display a custom page to tell users to
# stop trying to scrape or just return 302 https://yoursite.tld to
# be redirected back to your main map. You can also direct them to https://pornhub.com/ :)return 302 https://yoursite.tld/getthefuckoff.html;
}
}#
# This is your main location block (actually this is nginx default)
#location / {
try_files $uri $uri/ =404;
}#
# Rewrites for raw_data and gym_data
#rewrite ^/raw_data(.*)$ /api/raw_data.php?$1 last;
rewrite ^/gym_data(.*)$ /api/gym_data.php?$1 last;```
[logo]: https://raw.githubusercontent.com/ultrafunkamsterdam/Rocketmap-Monocle/master/screenshot.png "Screenshot front-end"