Skip to content

Commit

Permalink
Update README doc
Browse files Browse the repository at this point in the history
  • Loading branch information
angelocordon committed Sep 3, 2019
1 parent 18e65eb commit 1c8d08c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DATABASE=nodeconcept_dev
DATABASE_USER=postgres
DATABASE_PASSWORD=
PORT=3000
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,50 @@ Background: https://github.com/codebuddies/codebuddies/issues/1136
Crowdsourced brainstorm of problems we want to solve: https://pad.riseup.net/p/BecKdThFsevRmmG_tqFa-keep

# Proof-of-concept Goals

- Resource CRUD

TODO:

- User profiles
- How easy is it to set up an editable user profile?
- Calendar/hangouts
- How easy would it be to make a calendar widget that lets users block out times they're free for hangouts?

# Getting Started

Clone the project, run `npm install` and `npm start` to load up the server.
If having database errors with postgres, see this guide on getting it set up:
https://www.robinwieruch.de/postgres-sql-macos-setup
https://www.robinwieruch.de/postgres-sql-windows-setup

Copy `.env.example` as `.env` in the root directory. Not necessary to change the values at this time. Leave `DATABASE_PASSWORD` blank.

# How to use

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.

Alternatively, you can use cURL to interface with application.

```bash
# returns an collection of Resource objects
curl localhost:3000/resources
```

```bash
# POST request to create a new Resource with a JSON payload
curl -d '{ "title": "Some title!", "description": "Great description!" }' -H 'Content-Type: application/json' localhost:3000/resources
```

```bash
# DELETE request to delete a resource with the resource ID of 3
curl -X DELETE localhost:3000/resources/3
```

# Findings

TBD

# Technologies Used

Node, Express, Postgres, Sequelize (ORM to handle models and Postgres).

0 comments on commit 1c8d08c

Please sign in to comment.