Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.0 KiB

7 years ago
  1. # NodeJSBlog
  2. Recreating my wordpress blog in node JS.
  3. ##MYSQL Information
  4. '''sql
  5. create database blog_name;
  6. use blog_name;
  7. create table users(
  8. user_id mediumint unsigned not null AUTO_INCREMENT,
  9. first_name varchar(20) not null,
  10. last_name varchar(40) not null,
  11. user_name varchar(60) not null,
  12. pass char(40) not null,
  13. registration_date datetime not null,
  14. admin boolean not null,
  15. primary key(user_id)
  16. );
  17. create table categories(
  18. category_id mediumint unsigned not null AUTO_INCREMENT,
  19. name varchar(60) not null,
  20. primary key(category_id)
  21. );
  22. create table posts(
  23. post_id mediumint unsigned not null AUTO_INCREMENT,
  24. category_id mediumint unsigned not null,
  25. user_id mediumint unsigned not null,
  26. picture_url varchar(100) not null,
  27. published datetime not null,
  28. url varchar(100) not null,
  29. name varchar(100) not null,
  30. primary key(post_id)
  31. );
  32. create table popular_posts(
  33. popular_post_id mediumint unsigned not null AUTO_INCREMENT,
  34. post_id mediumint unsigned not null,
  35. primary key(popular_post_id)
  36. );
  37. grant all on blog_name.* to blog_user@localhost identified by "password";
  38. '''