Supersimple template/boilerplate for starting small projects with separated client side and server/api.
Install dependencies via Composer.
Run in /server directory:
php composer.phar install
Change the settings in server/config/config.php:
// Database settings
define("DB_HOST", "localhost");
define("DB_USER", "root");
define("DB_PASS", "passwd");
define("DB_NAME", "test");
// Password salt
define('PASS_SALT', "some_strong_random_string");
// Json Web Tokens
// Secret key, change this to your unique key, do not share or public anywhere
define("JWT_SECRET", "some_strong_random_string");
// Expiration of cookies in minutes
define("JWT_EXPIRE", 15);
Change the server address in client/js/app.js (right on the top):
$rootScope.globals = {
serverUrl: 'http://localhost/tajp/server'
}
Run _install/create_table.sql in your mysql database manager (phpmyadmin, adminer). This will create table 'accounts'.
And you are good to go.
- Slim: Great PHP framework (v2)
- slim-jwt-auth by Mika Tuupola
- corsslim by palanik
- Medoo simple fast PHP database framework by Catfan
- BRICKst neat CSS framework by Martin Allien
Released under MIT license, Copyright © 2015 Filip Vincůrek