Using Maps in your Express app with Leaflet.js
You can find the sample working code here
You can find the sample working code here
To check how to deploy with Heroku-cli read here
We will use this package to show lottie animations on our site
In your React code terminal run
We will use this package to show a map on our site
We will use this package to show an interactive calendar on our site
In your React code terminal run
const router = require("express").Router(); | |
// Lazy me, I don't have time to convert superagent to axios | |
const request = require('superagent'); | |
const UserModel = require('../models/User.model') | |
function requestAccessToken(code) { | |
return request.post('https://www.linkedin.com/oauth/v2/accessToken') | |
.send('grant_type=authorization_code') | |
.send(`redirect_uri=${process.env.LINKEDIN_REDIRECT_URI}`) | |
.send(`client_id=${process.env.LINKEDIN_CLIENT_ID}`) |
Note: Entire working code can be found here https://github.com/ManishPoduval/third-party-auth
Visit https://www.linkedin.com/developers/apps and create a new app for your project
const router = require("express").Router(); | |
const UserModel = require('../models/User.model') | |
// The client makes a API request to this url sending the data in the body | |
router.post("/facebook/info", (req, res, next) => { | |
const {name, email, image, facebookId} = req.body | |
// the name itself will include the last name | |
try { | |
// Create the user in the DB | |
UserModel.create({firstName: name, facebookId, image, email}) |