angular-mysql
angular-mysql copied to clipboard
Angular MySQL Application
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
Uses
- Angular.js v1.2.19
- MySQL
- PHP Slim framework (API)
- Bootstrap 3
Set Up
- Create a MySQL database named angular-mysql
- Run
install/angular-mysql.sqlto create and populate the users table (includes four dummy users) - Create Apache virtual root and point to
/appfolder
Notes
The .htaccess file in the /app folder redirects all requests to index.html (needed by Angular application)
API Endpoints
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