Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documents
img
routers
test
.gitignore
.travis.yml
Procfile
README.md
config.js
db.js
npm-server.textClipping
package-lock.json
package.json
server.js

README.md

CAUSEWAY API

This document provides general information on the Causeway app (formerly Non-Profit Match) and details on the api. For more information about the Causeway client, please see Causeway front end.

Causeway

Causeway facilitates meaningful contributions to meaningful causes. People WANT to make a difference, to do their part to make their neighborhood, community, world, better. Individuals: What many don't realize is that they already have talents, experiences, and/or disposable resources that could be put to use in this effort. Causeway helps you find accessible opportunities to plug in. Organizations: Causeway also seeks to help caring organizations find impactful help. It links them with the skills and resources that will make a real difference in their situation.

How it Works

placeholder

placeholder

placeholder

placeholder

Where to find Causeway

desc location
live client https://stoic-mccarthy-9c52cc.netlify.com/
client code https://github.com/brianjb-lfl/npmatch
deployed api https://dry-escarpment-60455.herokuapp.com/
api code https://github.com/brianjb-lfl/npm-server

Local API Use

  1. clone this repository
    git clone https://github.com/brianjb-lfl/npm-server

  2. move to the repository's local directory
    cd npm-server

  3. install dependencies
    npm install

  4. add a .env file to the project root *** NOTE: Make sure .env is included in the
    package .gitignore file (also in the root).

    #Port
    PORT=8080

    #DB
    DATABASE_URL=
    TEST_DATABASE_URL=
    DB_MODE=dev

    #Cors
    CLIENT_ORIGIN=http://localhost:3000

    #jwt
    JWT_SECRET=
    JWT_EXPIRY=7d

note: use of this api requires access to a postgres database

  1. if using a remote database instance (e.g. elephantSQL)
    create a .env file in the repository root with the following line:
    DATABASE_URL=(database connection string/url)

  2. OR, you can use a local mongo database
    when using a local database, omit the DATABASE_URL .env setting
    in the config.js file, modify the second part of the following line accordingly
    process.env.DATABASE_URL || 'postgres://localhost:{port}/{dbname}'

  3. start the server
    npm start

The api can now be accessed at:
http://localhost:8080/

Endpoints

Base url: https://dry-escarpment-60455.herokuapp.com/

api/auth
Login route


api/admin
Accessed on login to provide initial data load.


api/users
Data retrieval and functionality related to individual and organization users.


api/opportunities
Data retrieval and functionality related to opportunities to serve and be served.

api/roles
Functionality to link organizations and their admin users. Functionality to connect users to the organizations they want to follow.

api/responses
Functionality to manage user responses to posted opportunities.

Technology Used

  • javascript
  • node.js
  • express
  • cors
  • postgresql
  • knex
  • bcrypt
  • passport
  • mocha, chai
You can’t perform that action at this time.