[go: nahoru, domu]

Skip to content

estrada9166/cookie-handler-next.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Handler for server render with Next.js

Main Idea

The main idea behind this example is to handle the cookies when the view is render on the server side. Because on the server side it can't be something like document.cookie because it can't access to the document so the idea is to have a middleware on the server of Next.js that will get the cookie and set it in res.locals making it accessible from the view with static getInitialProps({ res })

How it works

Clone the repo

npm install
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published