GithubHelp home page GithubHelp 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.

Docker

You can also run it by Docker:

docker run -p 5678:5678 -v ./cicada.sqlite:/opt/cicada/sqlite/cicada.sqlite lizheming/cicada

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

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cicada's Issues

按步骤安装后访问一直报错,请问是哪影响的呢?

报错信息主要是“ [Error] SyntaxError: Unexpected token e in JSON at position 0
node -v
v6.10.3

附比较详细的信息:
0|cicada | [2017-07-08 19:48:00] [SOCKET] Connect mysql with mysql://cicada:[email protected]:3306/cicada
0|cicada | [2017-07-09 08:00:19] [SOCKET] Connect mysql with mysql://cicada:[email protected]:3306/cicada

/root/.pm2/logs/cicada-error-0.log last 15 lines:
0|cicada | at run (/data/cicada/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:89:39)
0|cicada | at /data/cicada/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:100:28
0|cicada | at _combinedTickCallback (internal/process/next_tick.js:73:7)
0|cicada | at process._tickDomainCallback (internal/process/next_tick.js:128:9)
0|cicada | [2017-07-09 08:01:26] [Error] SyntaxError: Unexpected token e in JSON at position 0
0|cicada | at Object.parse (native)
0|cicada | at _default.indexAction$ (/data/cicada/app/home/controller/setting.js:23:23)
0|cicada | at tryCatch (/data/cicada/node_modules/babel-runtime/regenerator/runtime.js:67:40)
0|cicada | at GeneratorFunctionPrototype.invoke [as _invoke] (/data/cicada/node_modules/babel-runtime/regenerator/runtime.js:315:22)
0|cicada | at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/data/cicada/node_modules/babel-runtime/regenerator/runtime.js:100:21)
0|cicada | at GeneratorFunctionPrototype.invoke (/data/cicada/node_modules/babel-runtime/regenerator/runtime.js:136:37)
0|cicada | at run (/data/cicada/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:89:39)
0|cicada | at /data/cicada/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:100:28
0|cicada | at _combinedTickCallback (internal/process/next_tick.js:73:7)
0|cicada | at process._tickDomainCallback (internal/process/next_tick.js:128:9)

底部添加到书签的链接功能增强

如果直接点的话,现在会弹出首页的表单页面,意义不大,可以提示让其拖拽到书签栏。

可以通过收藏的域名和当前页面的域名是否一样来判断。

你好,安装不成功,请求帮助

npm WARN deprecated [email protected]: Babel 5 is no longer being maintained. Upgrade to Babel 6.
npm WARN deprecated [email protected]: Copy its ~20 LOC directly into your code instead.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
extract:unzip → gunzTarPe ▐ ╢█████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░╟
Killed

我安装的时候, 有上面的提示,
我的服务器是 centos 6.7
编译 node.js 0.12.13 版本无法安装本程序,

下载编译好的 5.10.1 版本,安装就提示上面的了..
npm 版本是 3.8.3

看上面的提示,第一个和第三个好像是让我升级那两个东西, google 了好多种方法也没解决...

程序我是直接 wget 然后 unzip 解压的,用 vi 改过 pm2.json 中 cwd 的参数为当前目录. max_memory_restart 参数为 60M (我的VPS是个128M的小内存,不知道应不应该改这个)

500错误

nginx 平台 node v10.30 为什么会出现500错误呢~

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.