Git Product home page Git Product logo

backend's Introduction

backend

back end for safe space group app

Endpoints to register, login, and get info

Endpoint Description
'/' Displays a short welcome message just to make sure things work
'/register register a new user with { username: xxx, password: xxx, phone: xxxxxxxxxx } ID auto assigned. Phone number in 10-digit format. (no 1's at the front)
'/login' login with { username: xxx, password: xxx } and you'll get a welcome message and token
'/test' displays a list of registered users IF login and auth token are present

Once logged in and you've pushed the jwt to headers as 'Authorization'

Endpoint Description
'/addmessage' allows the adding of messages with { message: xxxx xxx xxxx xxxxxx } format
'/addmessage' ALTERNATE - ADD a timer { message: xxxx xxx xxxx xxxxxx, timer: [milliseconds] } send a number, or don't, if you want default of 30 seconds, don't send a timer, if you want a specific delay on the message send in milliseconds
'/messages' Displays all current messages attatched to the user id, with message id
'/deletemessage/:id' Deletes the message with the ID number sent
'/updatemessage/:id' Updates the message with the ID number sent, and new body object with message

Generic Login info:

Login Password
user pass
Harry10 Potter

#Final Test Final test passed 3/21/2019. -All endpoints are working. -All phone numbers (that are registered with twilio) are receiving texts after message add

Heroku does... things

It appears as though HerokuApp does some strange things with servers sometimes. New users will disappear every 4-6 hours it seems. But anything seeded will stay permanently. So if there is data you want to be there no matter what (for a pre-existing user) let me know.

Twilio Facts

The text message portion does NOT work with the server UNLESS you've verified with the trial Twilio account ID, which I'll have to do. So just let me know.

backend's People

Contributors

nek0senpa1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.