geekapk-r / Times

Simple commentable news for geekapk(deprecated)

Home Page:https://news.geekapk.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

times

Models

Post: String author, Date time, String text

Comment: String author, Date time, String text

APIs

GET /api/version -> version

GET /api/ -> num_posts
GET /api/<nth>/ -> Post
GET /api/<nth>/views -> num_views
GET /api/<nth>/comments/ -> [Comment
POST /api/<nth>/comment/<author> body=<text> -> new_len
GET /api/<nth>/comments/len -> num_comments

DELETE /api/pop/ (auth) -> new_len
POST /api/<author>/ body=<text> (auth) -> new_len

Extra

数据库不使用,采用每次启动读取数据每次退出序列化数据的方式 🌚

WebSocket 在文章被回复的时候发送文章索引。

SIGQUIT: output data and exit

SIGUSR1: output data

SIGUSR2: clear anti-spam log

Installation

crystal build -s -p --release src/times.cr
./times dolphins &

Usage

timelinerd <password>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Simple commentable news for geekapk(deprecated)

https://news.geekapk.org

License:Apache License 2.0


Languages

Language:Ruby 84.8%Language:Crystal 12.6%Language:HTML 2.1%Language:Shell 0.4%