Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: back-node-postgres #11

Open
konsumer opened this issue Feb 14, 2015 · 2 comments
Open

Request: back-node-postgres #11

konsumer opened this issue Feb 14, 2015 · 2 comments

Comments

@konsumer
Copy link
Contributor

A postgres version of back-node

@konsumer
Copy link
Contributor Author

I still need to flesh out exactly what sort of answers the REST callbacks make. So far "OK" (with quotes) for short responses, status 500 & 401 with {message:'The problem stated as a sentence.'} description for errors, depending on if it's a basic server error or if it's an authentication issues. I think these should be more standardized which will require more wrapping. In any case, feel free to get started.

The basic setup is this:

// middleware function calls next if user has a token, send 
module.exports = verifyFunction(){};

// sets up sub-route: returns an express() object with the endpoints in docs: 
module.exports.middleware = function(SETTINGS){}

Maybe I should make a skeleton for express that just checks for a plain password, with no database, just to make it really clear how it works (and give an extendable module to start with, so you don't have to rewrite the token function.)

@konsumer
Copy link
Contributor Author

Maybe the skeleton should be back-node, and database additions could be separate...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant