Skip to content

Commit

Permalink
Merge pull request #1 from amdcavallaro/update-bodypaser
Browse files Browse the repository at this point in the history
Updates deprecated bodyParser
  • Loading branch information
amdcavallaro authored Mar 10, 2022
2 parents 440faa2 + d4482a8 commit c063b12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
const express = require('express')
const app = require('express')()
const bodyParser = require('body-parser')
const nunjucks = require('nunjucks')
const Nexmo = require('nexmo')

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(express.json())
app.use(express.urlencoded({ extended: false }))
nunjucks.configure('views', { express: app })

const nexmo = new Nexmo({
const nexmo = new Nexmo({
apiKey: process.env.NEXMO_KEY,
apiSecret: process.env.NEXMO_SECRET
})

app.get('/', (req, res) => {
res.render('index.html', { message: 'Hello, world!' })
app.get('/', (req, res) => {
res.render('index.html', { message: 'Hello, world!' })
})

app.post('/verify', (req, res) => {
Expand Down

0 comments on commit c063b12

Please sign in to comment.