huy-qn / codedaily-v3

Home Page:https://news.kipalog.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codedaily

Live demo: https://news.kipalog.com/

Setup

Install Rust

Follow instructions install rust

DB

Use Postgres

  • Create your db name and your credentials
  • Put theme into url like: postgres://username:password@localhost/database_name
  • Add url into .env file

Config DB

Copy file .env.example to .env and add your config db url.

Install deps

Run command: cargo install

Install diesel-cli

Run command: cargo install diesel_cli --no-default-features --features=postgresql

Migrations DB

Run command: diesel migration run

Run local development server

cargo run --bin server

Build release

cargo build --release

Setup frontend

Use yarn

Run command: yarn install && yarn watch

Deploy

Config cronjob

In command line run: crontab -e and add job 0 */1 * * * /path/to/bin/crawler.

This job will run pass every hour at minute 0.

LICENSE

MIT & APACHE-2

About

https://news.kipalog.com/


Languages

Language:JavaScript 98.4%Language:Rust 1.0%Language:CSS 0.6%Language:HTML 0.0%Language:Makefile 0.0%