Skip to content

vasicvuk/AngularRC1AuthPHPIT255V1314

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is an example autentification with PHP and Angular 2 (RC1). Tokens are generated through PHP and saved into MySQL database.
Also this example has a DataTable Angular 2 plugin on All Rooms page.

The contents of php folder should be placed on PHP server root folder like htdocs (in XAMPP) or www in Apache server.

To run Angular Front end part of application. Run npm install in angular folder and then run npm start from bash.

Also you will need to import Database from this SQL. Database name and configuration is placed in php/config.php file.

CREATE TABLE IF NOT EXISTS `rooms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `roomname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `tv` int(11) DEFAULT NULL,
  `beds` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- Data exporting was unselected.


-- Dumping structure for table users.users
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `lastname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `username` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `password` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `token` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

About

Angular 2 RC1 Auth, Web service protected example - IT255 + Data Tables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published