Simple CRUD web using Sailsjs and MySQL
Here is another simple CRUD web that i built using Sailsjs and MySQL for storing the data. Made this just for fun, i have a lot of free time lately lol. I created similar CRUD web app like this using expressjs and mongodb couple years ago. Check that too if you are interested.
If you are new to sailsjs like me, check here to get started on sailsjs http://sailsjs.org/get-started
OK, since this is using MySQL, don’t forget to install the driver.
$ npm install sails-mysql
Create database on MySQL, in this case i named it “directory”, you can change it to anything you like and adjust it on
Here is the “category” table script
CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `alias` varchar(255) NOT NULL, `status` int(1) NOT NULL, `date_created` datetime NOT NULL, `parent_id` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
After everything is set, run this command on your console
On the console, it will tells you to access http://localhost:1337
Note : This app using Lumino, a free bootstrap based beautiful template from MediaLoot. Thanks!