davidwells / netlify-functions-workshop Goto Github PK
View Code? Open in Web Editor NEWNetlify Serverless Functions Workshop
Netlify Serverless Functions Workshop
A cookie's Max-Age
is the number of seconds until expiration, so the following code doesn't do what the author intended.
const hour = 3600000
const twoWeeks = 14 * 24 * hour
const myCookie = cookie.serialize('my_cookie', 'lolHi', {
secure: true,
httpOnly: true,
path: '/',
maxAge: twoWeeks,
})
An hour is 60*60=3600
seconds, it looks like this code is treating the max age as milliseconds.
Is there an easy way for me to get cookies without having to grab them from the header and parsing them out myself?
This repo looks awesome. I was looking at the MongoDB example. Are there issues of the server not disconnecting when the function completes?
I'm sure this is something pretty simple, but I've followed all the instructions in the 'Complete Code' section but on deploy I keep getting this message:
Please ensure "faker" is installed in the project.
I've run the init and npm install faker commands from within the functions dir.
Edit: I may have solved my own issue but I did find that if I deploy with 'netlify deploy -p' it worked fine, but if I deploy through a git push I get the error. Is there something extra I need to do in order to deploy with dependencies as a push?
Hi,
Many thanks for this repo, is a great resource to get familiarized with functions.
My issue is when I'm trying to complete lesson 5-authenication after creating the user and logging in I am not getting the user
object in the clientContext
object.
Fix _instructor/use-cases/1-rest-api/functions/methods/index.js
const Create = require('./create')
const Read = require('./read')
const Update = require('./read')
const Delete = require('./delete')
const ReadAll = require('./readall')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.