Skip to content

Instantly share code, notes, and snippets.

@catalinpit
catalinpit / client.js
Created May 26, 2021 12:23
src/notion/client.js
const { Client } = require('@notionhq/client');
require('dotenv').config();
const notion = new Client({
auth: process.env.NOTION_TOKEN
});
module.exports = {
notion
const app = require('fastify')({ logger: true });
require('dotenv').config();
app.register(require('./src/routes/routes'));
app.listen(process.env.PORT, (err, addr) => {
if (err) {
app.log.error(err);
process.exit(1);
}