This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "data": [ | |
| { | |
| "_id": "5e0b43311c9d44000063556e", | |
| "name": "Netlify Dev Release" | |
| }, | |
| { | |
| "_id": "5e149bf01c9d4400009c340a", | |
| "name": "Netlify Staging Release" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import db from './utility/db'; | |
| export async function handler(event, context) { | |
| context.callbackWaitsForEmptyEventLoop = false; | |
| const query = event.queryStringParameters; | |
| const queryLimit = query.limit ? Number(query.limit) : 10; | |
| const queryOffset = query.offset ? Number(query.offset) : 0; | |
| const queryFind = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MongoClient } from 'mongodb'; | |
| const dbUri = `mongodb+srv://${process.env.MONGO_DB_USERNAME}:${process.env.MONGO_DB_PASSWORD}@${process.env.MONGO_DB_CLUSTER}?retryWrites=true&w=majority`; | |
| export default { | |
| connection: null, | |
| async connect() { | |
| if (this.connection) { | |
| return this.connection; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MongoClient } from 'mongodb'; | |
| const dbUri = `mongodb+srv://${process.env.MONGO_DB_USERNAME}:${process.env.MONGO_DB_PASSWORD}@${process.env.MONGO_DB_CLUSTER}?retryWrites=true&w=majority`; | |
| let dbCachedConnection = null; | |
| const connectToDb = async () => { | |
| if (dbCachedConnection) { | |
| return dbCachedConnection; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "event": { | |
| "path": "/.netlify/functions/echo", | |
| "httpMethod": "GET", | |
| "headers": { | |
| "accept": "", | |
| "accept-encoding": "", | |
| "accept-language": "", | |
| "client-ip": "", | |
| "connection": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export async function handler(event, context) { | |
| return { | |
| statusCode: 200, | |
| body: JSON.stringify({ | |
| event: event, | |
| workingDirectory: process.env.PWD, | |
| netlifyDev: process.env.NETLIFY_DEV, | |
| nodeEnv: process.env.NODE_ENV, | |
| }), | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MongoClient } from 'mongodb'; | |
| const dbUri = `mongodb+srv://${process.env.MONGO_DB_USERNAME}:${process.env.MONGO_DB_PASSWORD}@${process.env.MONGO_DB_CLUSTER}?retryWrites=true&w=majority`; | |
| export async function handler(event, context) { | |
| const dbClient = new MongoClient(dbUri, { useNewUrlParser: true }); | |
| await dbClient.connect(); | |
| const dbBoardCollection = dbClient.db('workboard').collection('board'); | |
| const dbBoardDocs = await dbBoardCollection.find({}).toArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export async function handler(event, context) { | |
| return { | |
| statusCode: 200, | |
| body: JSON.stringify({}), | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "luckySix", | |
| "name": "Lucky Six", | |
| "lagalName": "NSoft Lucky Six", | |
| "keywords": [ | |
| "luckysix", | |
| "lucky", | |
| "six", | |
| "bingo" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .articleItem { | |
| padding: 12px; | |
| margin-bottom: 12px; | |
| background-color: #fff; | |
| display: flow-root; | |
| position: relative; | |
| cursor: pointer; | |
| text-decoration: none; | |
| color: black; |