Giter Club home page Giter Club logo

monocle-rm-front's Introduction

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

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 credetials

In 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;

monocle-rm-front's People

Contributors

ultrafunkamsterdam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.