Skip to content

binarapps/snippet-hero

Repository files navigation

snippet-hero

Build Status It is example node js project

Prerequisites

node 4+
npm

I recommend using nvm

Installation

Packages

npm install

Database

To create database run:

psql -c "CREATE DATABASE snippethero_development WITH ENCODING 'UTF8'"
or
createdb -E UTF8 snippethero_development

To setup app database configuration copy example file and overwrite it with your username and password to database:

cp server/config/config.json.example server/config/config.json

To run migrations

npm run sequelize -- db:migrate

If you had Users in your database before migrations, make sure they have their ratings average updated by running:

node server/tasks/checkSnippetUserAvg.js

Secrets

cp server/config/secrets.json.example server/config/secrets.json

Run dev server

npm start

Tests

First create test database

createdb -E UTF8 snippethero_test

Then to run backend tests:

npm run test:server

To run frontend test simply (keep in mind that you need chrome browser to be able to do it):

npm run test:client

To fire all tests:

npm test

Deploy

// TODO

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published