harrymt / ProductivityMapping-Server

The server side to Productivity Mapping.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Study Mapper (Server)

The server side to Study Mapper. Links with the app component Study Mapper

Built for the University of Nottingham as a final year BSc Computer Science project.

In order to build this project, you must place an Environment_variable.class.php in the outer directory with the following structure. This must contain a Google Maps Javascript API key for the front end to be displayed.

Environment_variable.class.php

<?php
    class Environment_variable {
        // Mysql database settings
        public static $MYSQL_USERNAME = ""; // Username, e.g. 'root'
        public static $MYSQL_PASSWORD = ""; // Password, e.g. 'root'
        public static $MYSQL_DATABASE = ""; // Database name, e.g. 'mydatabase'
        public static $MYSQL_HOST = ""; // Hostname, e.g. 'localhost''

        public static $LOCAL_SERVER_URL = ""; // Folder of API, e.g. http://localhost/~username/folder/api/v1
        public static $SERVER_URL = "";  // This server API url, e.g. http://harrys_server.com/~username/folder/api/v1

        public static $API_KEY = ""; // A unique ID to be passed in with every call, e.g. 'my_secret_password'
        public static $API_GOOGLE_KEY = ""; // Google Maps javascript API key
    }
?>

Uses the following technologies.

How to Build

  • Uses GruntJS as a task runner to build the SCSS and JS files.
  • Run sudo npm install in main directory
  • Run grunt watch to watch folders so that SCSS compiles to CSS & JS combines, or just run grunt to build all.

Gruntfile.js

The following Grunt tasks are used they can be found here.

grunt.loadNpmTasks('grunt-contrib-concat'); // Concatenate JS
grunt.loadNpmTasks('grunt-contrib-sass'); // Process Sass files
grunt.loadNpmTasks('grunt-contrib-watch'); // On file update, do task

About

The server side to Productivity Mapping.

License:MIT License


Languages

Language:PHP 65.4%Language:JavaScript 26.5%Language:CSS 8.1%