clone repo
$ git clone https://github.com/fac-13/LVKI.blogger.git
install dependencies
$ npm i
create .env and add
LVKI_DB_URL = postgres://[username]:[password]@localhost:5432/[database name]
TEST_DATABASE_URL = postgres://[username]:[password]@localhost:5432/[test database name]
SECRET = [secret for cookie]
build database
$ npm run build:db
run server
$ npm start
run tests
$ npm test
-
When user lands on page they see a list of blog posts
cards
-
When a user clicks a card you will be sent to the page of the blog post
-
There will be a navbar on each view
- Before user logs in, the user will see:
- login and sign up
- After a user logs in:
- avatar, username & logout
- Before user logs in, the user will see:
-
There will be a separate view for login and signup
-
The landing page of a logged in user will have a form at the top of the page to add a new blog post
- User profile page
-
Discuss user stories
-
Design database schema
-
Design architecture
-
Set up dev environment
.env
will hold three variables:DATABASE_URL
TEST_DATABASE_URL
SECRET
-
set up data
-
set up express using handlebars
-
set up controlers to respond on
/
,/post
-
views
main.hbs
layouthome.hbs
viewpost.hbs
view
-
created more views
-
added user authentication on server
-
getting post page view
-
showing user in the navbar
-
logout button
-
posting data to the database when someone creates a new blog post
-
logout user (POST)