Code Monkey home page Code Monkey logo

cicada's Introduction

cicada - favorite article collections

A favorite article collections application based on Node.js & ThinkJS.

Cicada can crawl content of target url to prevent can not view the contents of the original page because of failure. There has full version and concise version base on whether contains reference resources like JS and CSS.

Tips: Spider can't crawl page need login.

Installation

Confirm your Node.js version >= 0.12.0, then run following command:

git clone [email protected]:thinkjs-team/cicada.git
cd cicada;
npm install;

Tip: If you want to use kinle push service, you need npm install html-pdf at the end.

Configuration

Modify src/common/config/config.js:

export default {
  port: 5678, //service start port
  protocol: 'http', //domain protocol
  token: 'TOKEN_VALUE', //token to check before every operation
  website_title: 'welefen\'s favorites', //site's title
  visibility: 'public'  //set private to check token before view articles
};

Compile

npm run compile;

run this command to compile code.

Use MySQL instead of SQLite

Default cicada uses SQLite to store data. If you want to use MySQL instead of SQLite, you should modify config file src/common/config/db.js:

export default {
  type: 'sqlite',
  name: 'cicada',
  prefix: 'ci_',
  encoding: 'utf8',
  nums_per_page: 10,
  cache: {
    on: true,
    type: '',
    timeout: 3600
  },
  adapter: {
    mysql: {
      host: '127.0.0.1',
      port: '',
      user: 'root',
      pwd: 'root'
    },
    sqlite: {
      path: think.ROOT_PATH + '/sqlite'
    }
  }
};

Change type value to mysql, and adapter.mysql with right mysql info.

Then you should create a database name cicada and import mysql/cicada.sql to it.

Start service

Install pm2 in global and run pm2 to check if exists.

Modify cwd value to current cicada's path in pm2.json file.

run pm2 startOrReload pm2.json to start service.

Config nginx.conf

Modify nginx.conf and soft link to nginx conf folder, then reload nginx.

Add bookmark

Drag bookmarks in the site's footer to your browser bookmarks bar.

cicada's People

Contributors

lizheming avatar akira-cn avatar welefen avatar qgy18 avatar solarhell avatar

Watchers

taozywu 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.