Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 880 Bytes

README.md

File metadata and controls

16 lines (14 loc) · 880 Bytes

daily_message

This project provides a small Express based REST API to run on repl.it.

security

Because this is just a small project that shouldn't store sensitive information there is no authentication but just an authorisation. For this to work you need to export the following environment variables: USER_TOKEN and ADMIN_TOKEN. The first one is needed when you want to restrict the User access, and the second one for all calls that edit the database.

Local testing

To test or debug this project locally you need to provide the environment variable REPLIT_DB_URL
This variable needs to be refreshed because the url token will expire. The respone would be something like invalid token: token is expired by ...

ToDos

  • Maybe add edit endpoint
  • Make use of morgan's extended logging