Skip to content

Instantly share code, notes, and snippets.

@laniltee
Created October 26, 2018 15:14
Show Gist options
  • Save laniltee/f860466923f856048f1f4bc8a5fa8b39 to your computer and use it in GitHub Desktop.
Save laniltee/f860466923f856048f1f4bc8a5fa8b39 to your computer and use it in GitHub Desktop.
ps setup
// Applying middleware
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());
app.use(cookieParser());
app.use(nocache());
// Views
app.use(express.static('views'));
// Server Startup
app.listen(PORT, () => {
console.log(`Synchronize Token Pattern Demo Started On ${PORT}`);
});
// JS Object to store Session IDs with CSRF tokens
const SESSION_IDS = {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment