Privacy policy and Terms of use page added. Adjustments in the index and auth pages and added the beta header

This commit is contained in:
2022-04-11 22:02:09 -03:00
parent 42e4bf0b71
commit df5ca3dfef
12 changed files with 238 additions and 7 deletions

View File

@@ -1,10 +1,13 @@
const Express = require('express')
const app = Express()
const port = (process.env.PORT || 3000)
const port = (process.env.PORT || 3030)
const axios = require('axios')
require('dotenv').config()
const favicon = require('serve-favicon');
app.use(favicon(__dirname + '/public/favicon.ico'));
const hbs = require('hbs')
hbs.registerPartials(__dirname + '/views/partials')
@@ -12,11 +15,11 @@ app.set('view engine', 'hbs')
app.use(Express.static('public'));
app.get('/auth', async (req, res) => {
app.get('/', (req, res) => {
res.render('index')
})
console.log(req.query)
console.log(process.env.NOTION_INTEGRATION_ID)
console.log(process.env.NOTION_INTEGRATION_SECRET)
app.get('/auth', async (req, res) => {
async function requestAccessToken() {
try {
@@ -73,4 +76,12 @@ app.get('/auth', async (req, res) => {
})
})
app.get('/privacy-policy', (req, res) => {
res.render('privacy-policy')
})
app.get('/terms-of-use', (req, res) => {
res.render('terms-of-use')
})
app.listen(port, () => console.log('port', port))