Added template routes
Starting with creating a user
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
const express = require('express')
|
||||||
|
const app = express()
|
||||||
|
const port = 3000
|
||||||
|
|
||||||
|
app.use(express.json())
|
||||||
|
|
||||||
|
// User Routes
|
||||||
|
app.post('/api/v1/user/new', (req, res) => {
|
||||||
|
res.send('Posting')
|
||||||
|
console.log(req.body)
|
||||||
|
|
||||||
|
let username = req.body['username']
|
||||||
|
console.log(`Username: ${username}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Text Routes
|
||||||
|
app.post('/api/v1/text/new', (req, res) => {
|
||||||
|
res.send('Create new text')
|
||||||
|
})
|
||||||
|
app.post('/api/v1/text/queue', (req, res) => {
|
||||||
|
res.send('Queue text')
|
||||||
|
})
|
||||||
|
|
||||||
|
app.listen(port, () => {
|
||||||
|
console.log(`textsender-api listening on port ${port}`)
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user