Skip to content

Commit f62e0ad

Browse files
committed
added delivery package generation
1 parent 1d7a3bf commit f62e0ad

File tree

5 files changed

+1025
-8
lines changed

5 files changed

+1025
-8
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
node_modules/
2+
3+
# files from build
4+
/prexvis
5+
/prexvis-*.tgz

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,32 @@ chrome http://localhost:3000/
4343
| `./bin/aalwines` | binary of AalWiNes tool |
4444
| `./bin/moped` | binary of moped tool |
4545

46+
## Building a binary delivery package
47+
48+
Building a package containing a binary delivery can easily be done with the command
49+
50+
```bash
51+
npm run pack
52+
```
53+
54+
The delivery package including aalwines, moped, sample data and the prexvis binary is in:
55+
56+
`./prexvis-0.1.0.tgz`
57+
58+
Beside the prexvis tool it includes everything necessary to run it: nodejs, aalwines, moped and sample data.
59+
60+
Unpack it, run the binary and use your browser to go to http://localhost:3000/
61+
62+
```bash
63+
tar -xzvf prexvis-0.1.0.tgz
64+
cd prexvis-0.1.0
65+
./prexvis
66+
67+
# browse to http://localhost:3000/
68+
```
69+
70+
Own sample data can be added in the directory `data/models`.
71+
4672
## Optional Requirements
4773

4874
### PM2 (optional)

app.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ const path = require('path');
44
const http = require('http').createServer(app);
55
const io = require('socket.io')(http);
66

7-
const modelsPath = path.join(__dirname, 'data', 'models');
8-
const binPath = path.join(__dirname, 'bin');
7+
console.log('prexvis - Visualization for AaalWiNes');
8+
console.log(' Version 0.1.0');
9+
10+
const modelsPath = path.join(process.cwd(), 'data', 'models');
11+
const binPath = path.join(process.cwd(), 'bin');
912
const models = require('./backend/models')(modelsPath, binPath, models => {
1013
io.emit('models', models);
1114
});
@@ -38,5 +41,6 @@ app.use(function(req, res) {
3841
});
3942

4043
http.listen(3000, function() {
41-
console.log('Listening on port 3000!');
44+
console.log();
45+
console.log('Start your browser and go to http://localhost:3000/');
4246
});

0 commit comments

Comments
 (0)