- Create your project with Vue CLI.
- Add a
.npmrc
file with the contents:
global-style = true
- Add a blank
.tesselignore
file so that nothing is left out you don't intend.
- Add a
.tesselinclude
file with the contents:
/dist
- Create an index.js file with the contents:
const express = require('express');
const app = express();
let tessel = null;
try {
tessel = require('tessel');
} catch(e) {
}
app.use('/', express.static(__dirname + '/dist'));
app.listen(tessel ? 80 : 8080);
if (tessel) {
tessel.network.wifi.connection(function(error, settings) {
console.log(`Server running at http://${settings.ip}/`);
});
} else {
console.log("Server running at http://127.0.0.1:8080/");
}
- Yarn or NPM add
express
to your project.
- Run
yarn build
- Execute the Tessel 2 run command:
t2 run index.js