Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vladtsf/newstab-backend
https://github.com/vladtsf/newstab-backend
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vladtsf/newstab-backend
- Owner: vladtsf
- Created: 2013-10-28T01:15:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-15T14:53:04.000Z (about 11 years ago)
- Last Synced: 2024-04-15T02:13:24.742Z (9 months ago)
- Language: Ruby
- Size: 520 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Newstab
### Requirements
* Postgresql
* Redis
* libxml2
* libxslt
* ImageMagick### Installation
```bash
bundle install
rake db:create db:migrate db:seed
```### Run
`rails s`### Queue
`sidekiq -c 5 --verbose -q feed,post`### Deployment
#### setup environment
`cap deploy:setup`#### Hands on feeds parse
`cap feeds:parse`#### reload nginx
`cap nginx:reload`#### S3
Throw the `s3.yml` to `shared/files/config/`#### just deploy
`cap deploy`### API
#### Feed
*GET* /api/feed?limit=30&offset=0
```json
{
"offset": 0,
"limit": 30,
"total": 159,
"items": [
{
"id": 309,
"image": {
"src": "http://s3.amazonaws.com/newstab/posts/image_srcs/000/000/309/original/1383241808506.jpg20131031-5507-1haifd7?1383241808",
"width": 256,
"height": 168
},
"title": "Сочи-2014. Канадцы приедут в Сочи в черно-бело-красном",
"href": "http://news.sportbox.ru/Vidy_sporta/Events/Sochi2014/spbfoto_NI413035_Kanadci-priedut-v-Sochi-v-cherno-belo-krasnom"
}
]
}
```