An example of Socket.io with Node.Js on the beagle bone or Raspberry
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.

13 lines
340 B

  1. const express = require("express");
  2. const app = express();
  3. const http = require("http");
  4. const server = http.createServer(app);
  5. app.get('/', (req, res)=>{
  6. res.sendFile(__dirname + '/index-static.html');
  7. //res.send('<h1> Hello World</h1>');
  8. });
  9. server.listen(4040, ()=>{
  10. console.log('listen on http://beaglebone-black.local:4040');
  11. });