You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone do repositório
git clone https://github.com/gabrielrs1/News.git
# Raiz do projeto
yarn
# No terminal digite: cd Template
yarn
# Conectar o banco de dados - MongoDB
Na pasta src/database/db.ts você deve trocar a conexação pela qual preferir
connect("mongodb://localhost:27017/newsletter");
# Crie na raiz do projeto um .env com as seguintes informações:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
JWT_SECRET=applicationnewsletter
PAGARME_ENCRYPTION_KEY=
PAGARME_CLIENT_SECRET=
NEWS_API=
Vamos precisar preencher as variáveis do google, pagarme e newsapi
Segue abaixo:
Google
Obter client id e client secret:
https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow#creatingcred
Após entrar no Google Cloud Plataform:
1 - Criar tela de permissão Oauth
2 - Segue o tutorial do link normalmente.
* Utilizar o URI http://localhost:3000
Pagar.me
Obter encryption key e client secret:
https://beta.dashboard.sandbox.pagar.me/
News API
Obter news api:
https://newsapi.org/
Start application
# Na raiz do projeto template/src/context/auth.tsx
Encontre a variável clientId e preencha com o CLIENT_ID do Google
# No terminal
yarn dev
# No terminal - cd template
yarn dev