All Projects → poga → yahnc

poga / yahnc

Licence: other
Yet Another Hacker News Clone with PgBase

Programming Languages

javascript
184084 projects - #8 most used programming language
livescript
113 projects

Server

Download latest pgrest-websocket

git clone https://github.com/pgrest/pgrest-websocket
cd pgrest-websocket
npm i
npm run prepublish

create db

CREATE TABLE links (
  _id serial primary key,
  title text,
  url text,
  rating integer default 0,
  create_date timestamp default current_timestamp
);

CREATE TABLE comments (
  _id serial primary key,
  link_id integer references links(_id),
  body text,
  create_date timestamp default current_timestamp,
  rating integer default 0
);

run

  ./bin/cmd.js --db YOUR_DB_NAME --websocket

Client

fix host in index.ls and compile it with lsc if you're not running on localhost

open index.html with browser

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].