Project with the goal of creating a backend server with an API for interacting with archived YouTube videos and metadata.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
446 B

  1. const http = require('http');
  2. const port = process.env.PORT || 62988;
  3. const expressHandler = require('express');
  4. const service = expressHandler();
  5. const metaApi = require('./api/metadata');
  6. service.use('/meta', metaApi);
  7. service.use('/', (req, res, next) => {
  8. res.status(403).json({
  9. message: 'You do not have permission to access this resource'
  10. })
  11. })
  12. const server = http.createServer(service);
  13. server.listen(port, 'localhost');