This application is a sample CRUD application built with Angular.js and MySQL and a RESTful API. Based on the sample application angular-cellar by Christophe Coenraets:
https://github.com/ccoenraets/angular-cellar
- Angular.js v1.2.19
- MySQL
- PHP Slim framework (API)
- Bootstrap 3
- Create a MySQL database named angular-mysql
- Run
install/angular-mysql.sql
to create and populate the users table (includes four dummy users) - Create Apache virtual root and point to
/app
folder
The .htaccess
file in the /app
folder redirects all requests to index.html
(needed by Angular application)
GET /api/users Gets all users
POST /api/users Creates a new user
GET /api/users/:id Gets a user by Id
GET /api/users/search/:query Searches user by name
PUT /api/users/:id Updates a user by Id
DELETE /api/users/:id Deletes a user by Id