All Projects → DIYgod → Do-you-like-me

DIYgod / Do-you-like-me

Licence: other
🍭 UI组件 -- Do you like me?

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language
CSS
56736 projects
HTML
75241 projects

Do you like me?

npm npm npm

Usage

Back-end

1. Use NodeJS + MongoDB

  • Install NodeJS 和 MongoDB
  • Upload back-end/nodejs/*
  • Run in nodejs:
$ npm install
$ nohup node index.js &
  • Change js/like.js
url:8888/api/like?action=add
url:8888/api/like?action=get
  • Enjoy it!

2. Use PHP + MySQL

  • Create a mysql table, run sql:
CREATE TABLE IF NOT EXISTS `votes` (
    `id` int(10) NOT NULL AUTO_INCREMENT,
    `likes` int(10) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `votes` (`id`, `likes`) VALUES
(1, 0);

CREATE TABLE IF NOT EXISTS `votes_ip` (
    `id` int(10) NOT NULL AUTO_INCREMENT,
    `vid` int(10) NOT NULL,
    `ip` varchar(40) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  • Fill out database information in like.php
  • Upload like.php
  • Enjoy it!

Font-end

See demo

Demo

  1. Anotherhome
  2. https://www.anotherhome.net/file/like/

LICENSE

MIT © DIYgod

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].