
Pezouvanis Sotiris
I am an electronics technician by profession, with an in-depth knowledge of code writing and its innovative use in Web and App Development.

Demo mysql data with angular
api RESTful service created with Slim and RedBeanPHP
is for test for localhost :P the app create automatic tables in mysql database
fields in the tables create automatic by selecting type of input in new entry
create new table navigate to localhost:8000/#!/{yourtablename}
RESTful service
Install the Slim http://www.slimframework.com/
Download the RedBeanPHP copy in to folder of your api.
with slim and the api/index.php of files. apiurl like http://localhost/api/ or http://localhost/my_api/api/.
create database in your mysql.
edit the index.php and fix the mysql connection.
//setup the REDBEANPHP
R::setup('mysql:host=localhost;dbname=yourdatabase','username','password');
after if you navigate to your localhost/api get array of tables of your database.
Instructions
app create with lineman and angular
for my api Slim enable the config/application.js API Proxying
server: {
apiProxy: {
prefix:'/my_api/',
enabled: true,
host: 'localhost',
port: 80
}
}
and set the dataService path in file services.js
return $resource('my_api/api/:data/:id', {}, {});
and set the path in file rootCtrl.js
$http.get('/my_api/api').success(function(data){
install
- git clone https://github.com/sotospez/angular-slim-redbean-quick-mysql.git my-app
- cd my-app
- sudo npm install -g lineman
- npm install
- open your web browser to localhost:8000
Demo