The server side to Productivity Mapping.
PHP JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
js
scss
templates
.gitignore
.htaccess
API.class.php
DatabaseAdapter.class.php
Gruntfile.js
LICENSE.txt
MyAPI.class.php
README.md
RequestUtil.class.php
ZoneTableSchema.class.php
api.php
index.php
package.json

README.md

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