Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Catalin Pit catalinpit

🎯
Focusing
View GitHub Profile
View app.js
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);
}
@catalinpit
catalinpit / client.js
Created May 26, 2021
src/notion/client.js
View client.js
const { Client } = require('@notionhq/client');
require('dotenv').config();
const notion = new Client({
auth: process.env.NOTION_TOKEN
});
module.exports = {
notion