We are building a simple blog posting web application that allows users to log into their account and input new blogs posts that can be viewed in a newsfeed of most recents posts.
npm install
config.env
fileAs a user, I want to be able to:
We mapped out the following wireframes for our site, that included three different pages:
We used the following schema for the database:
Column | Type | Modifiers |
---|---|---|
id | integer | not null default |
username | character varying(100) | not null |
password | character varying(100) | not null |
avatar_url | character varying(100) | not null |
Column | Type | Modifiers |
---|---|---|
id | integer | not null default |
user_id | integer | not null |
title | character varying(100) | not null |
body_text | character varying(2000) | not null |
image_url | character varying(100) | not null |
We made our wireframes using this website: moqup.com
Setting up a test database:
psql
in the terminalCREATE DATABASE testDatabaseName
\c testDatabaseName
\i ./database_build/db_build.sql
or the path to your sql filter"pretest": "ENV=testing node database_build/db_build.js", "test": "tape tests/tests.js | tap-spec",
const environment = require('env2');
if (process.env.ENV === 'testing') {
environment('config-test.env');
} else {
environment('config.env');
}