Giter Site home page Giter Site logo

maxiaoding / do-you-like-me Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diygod/do-you-like-me

0.0 1.0 0.0 1.83 MB

:lollipop: UI组件 -- Do you like me?

Home Page: https://www.anotherhome.net/file/like/

JavaScript 58.00% PHP 23.04% CSS 18.97%

do-you-like-me's Introduction

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

do-you-like-me's People

Contributors

diygod avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.