react-native-video/examples/video-caching/server.js

22 lines
385 B
JavaScript
Raw Normal View History

2018-02-28 05:55:08 -07:00
/**
* Simple http server for serving the .mp4 file
*/
"use strict";
const path = require("path");
const express = require("express");
const app = express();
const publicPath = path.join(__dirname, "../basic");
app.use(express.static(publicPath));
app.listen(3000, function(err) {
if (err) {
console.error(err);
return;
}
console.log("Listening on port 3000");
});