Cryptonews is a Hacker News clone for the cryptocurrencies industry.
You are going to need:
- node
- git
- yarn or npm
- postgres
-
Clone this repository.
git clone https://github.com/roywalker/cryptonews-server.git
-
Install dependencies.
yarn install
-
Create the databases.
$ psql
$ CREATE DATABASE cryptonews;
$ CREATE DATABASE cryptonews_test;
-
Migrate the database.
yarn run db:migrate
-
(Optional) Fill the database with sample data.
yarn run db:seed
-
(Optional) Create .env file.
Variable | Description |
---|---|
PORT | API port to listen from |
DATABASE_URL | Postgres database URI |
DATABASE_TEST_URL | Postgres test database URI |
JWT_SECRET | JSON Web Token secret |
$ yarn dev
You can now access the API at http://localhost:3000/api
$ yarn test