Skip to content

Commit 1c8d08c

Browse files
committed
Update README doc
1 parent 18e65eb commit 1c8d08c

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DATABASE=nodeconcept_dev
2+
DATABASE_USER=postgres
3+
DATABASE_PASSWORD=
4+
PORT=3000

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,50 @@ Background: https://github.com/codebuddies/codebuddies/issues/1136
55
Crowdsourced brainstorm of problems we want to solve: https://pad.riseup.net/p/BecKdThFsevRmmG_tqFa-keep
66

77
# Proof-of-concept Goals
8+
9+
- Resource CRUD
10+
11+
TODO:
12+
813
- User profiles
914
- How easy is it to set up an editable user profile?
1015
- Calendar/hangouts
1116
- How easy would it be to make a calendar widget that lets users block out times they're free for hangouts?
1217

18+
# Getting Started
19+
20+
Clone the project, run `npm install` and `npm start` to load up the server.
21+
If having database errors with postgres, see this guide on getting it set up:
22+
https://www.robinwieruch.de/postgres-sql-macos-setup
23+
https://www.robinwieruch.de/postgres-sql-windows-setup
24+
25+
Copy `.env.example` as `.env` in the root directory. Not necessary to change the values at this time. Leave `DATABASE_PASSWORD` blank.
26+
27+
# How to use
28+
29+
Once the server is up, the application is available by visiting localhost:3000 in the browser. Using RESTful paths, going to `/resources` will list all current resources, `/resources/:resourceId` will show a single resource based on ID.
30+
31+
Alternatively, you can use cURL to interface with application.
32+
33+
```bash
34+
# returns an collection of Resource objects
35+
curl localhost:3000/resources
36+
```
37+
38+
```bash
39+
# POST request to create a new Resource with a JSON payload
40+
curl -d '{ "title": "Some title!", "description": "Great description!" }' -H 'Content-Type: application/json' localhost:3000/resources
41+
```
42+
43+
```bash
44+
# DELETE request to delete a resource with the resource ID of 3
45+
curl -X DELETE localhost:3000/resources/3
46+
```
47+
1348
# Findings
1449

50+
TBD
51+
1552
# Technologies Used
53+
54+
Node, Express, Postgres, Sequelize (ORM to handle models and Postgres).

0 commit comments

Comments
 (0)