Skip to content

Commit

Permalink
fix: Try fixing Raspberry Pi docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed May 27, 2021
1 parent 1bff031 commit 5d5cddd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:current-alpine as node-original
FROM node:14-alpine as node-original
FROM node-original as install
WORKDIR /usr/src/app
COPY package*.json ./
Expand Down
2 changes: 1 addition & 1 deletion bin/run
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const Smartmeter = require('../dist/index.js').Smartmeter;
const Smartmeter = require('../dist/index').Smartmeter;

const smartmeter = new Smartmeter();
smartmeter.start();
Expand Down
23 changes: 23 additions & 0 deletions example/extend-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

const Smartmeter = require('../dist/index').Smartmeter;
const ConfigLoader = require('../dist/index').ConfigLoader;

const config = ConfigLoader.Load();

// Change something to the config
//config.outputs.debug = true;

const smartmeter = new Smartmeter(config);

// Add your custom output
// const newOutput = new xxx() // As long as it implements Output
// smartmeter.addOutput(newOutput);

smartmeter.start();

// Listen for exit signal and cleanly shutdown
process.on('SIGINT', async () => {
console.log('Exiting....');
await smartmeter.stop();
process.exit(0);
});
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import P1Map from './p1-map';
import { DecryptionResult, P1Crypt } from './p1-crypt';
import { Output } from './output/output';
import IntervalOutput from './output/interval-output';
import { SmartmeterConfig } from './config';
import { SmartmeterConfig, ConfigLoader } from './config';
import Smartmeter from './smartmeter';

export {
DsmrMessage, P1Crypt, DecryptionResult, P1Map, Output, IntervalOutput, SmartmeterConfig, Smartmeter,
DsmrMessage, P1Crypt, DecryptionResult, P1Map, Output, IntervalOutput, SmartmeterConfig, ConfigLoader, Smartmeter,
};

0 comments on commit 5d5cddd

Please sign in to comment.