Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

ssdev-95/nlw-heat-dowhile-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dowhile-app-node

Project setup

Install dependencies

yarn install

Create a file called .env in the root of project with theese variables:

GITHUB_CLIENT_ID -> Github OAuth Client ID GITHUB_CLIENT_SECRET -> GitHub OAuth Secret

JWT_SECRET -> Secret used for jwt token

API_KEY, AUTH_DOMAIN, PROJECT_ID, STORAGE_BUCKET, MESSAGING_SENDER_ID, APP_ID -> Variables used to setup connection with the database

Refer to NLWHeatDoWhileAppVue repo for intruction on how to setup and run the frontend app to consume API in this project, Or consume this API with REST Client of your choice :D

Note: Depending on which platform you may deploy, you would, or not, need to define a PORT variable where the application will run on, or maybe it will just be configured by the platform itself automagically :D

magic

Compiles and hot-reloads for development

yarn dev

The endpoints available in this API:

'/messages' (GET) -> Returns info of the author of a message, must pass author_id as query parameter author in the request

'/messages' (POST) -> Create a new message entry into the database and return's the new message

'/messages/last_3' (GET only) -> Returns the last three messages

'/authenticate' (POST only) -> Perform user creation, if doesn't exists, and returns info about user and a jwt token for authenticated requests

'/profile' (GET only) -> Returns the data related to a given,logged in, user

Enjoy :D

dowhile

About

nlw-heat-dowhile-node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages