Skip to content

Instantly share code, notes, and snippets.

@cwizard2011
Created May 8, 2021 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwizard2011/cacf0a6f4576ac3c64204556edd20611 to your computer and use it in GitHub Desktop.
Save cwizard2011/cacf0a6f4576ac3c64204556edd20611 to your computer and use it in GitHub Desktop.
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