Skip to content

Instantly share code, notes, and snippets.

@fredriccliver
Created June 20, 2020 09:58
Show Gist options
  • Save fredriccliver/c03d44c3083a02735bbf8a606d1cd5fd to your computer and use it in GitHub Desktop.
Save fredriccliver/c03d44c3083a02735bbf8a606d1cd5fd to your computer and use it in GitHub Desktop.
http request and read practice
const express = require('express')
const port = 3000
const bodyParser = require('body-parser')
const app = express()
app.use(bodyParser.urlencoded({ extended: true }))
app.get('/', (req, res) => {
res.send("hello")
})
app.post('/', (req, res) => {
res.send('hello on post call')
})
app.listen(port, () => {
console.log(`Node is listening on port ${port}`);
console.log(`go to http://localhost:${port}`)
})
const caller = require('./src/caller')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment