mirror of
https://github.com/FranP-code/Open-Telegram-to-Notion-Backend.git
synced 2025-10-12 23:52:54 +00:00
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:
21
index.js
21
index.js
@@ -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))
|
||||
Reference in New Issue
Block a user