-
-
Save cwizard2011/cacf0a6f4576ac3c64204556edd20611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const { kinesis } = require('./util/kinesis'); | |
require('dotenv').config(); | |
const { json, urlencoded } = express; | |
const app = express(); | |
app.use(json()); | |
app.use(urlencoded({ extended: true })); | |
app.get('/', (req, res) => { | |
return res.status(200).send({ | |
message: 'Welcome to our AWS Kinesis Video Streaming API' | |
}) | |
}); | |
app.get('/kinesis-video-url', (req, res) => { | |
const response = kinesis.createChannel('New_Tutorial_Channel', 'MASTER'); | |
return res.status(200).json(response); | |
}) | |
app.listen(3000, () => { | |
console.log(`app running on port: 3000`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment