Skip to content

Commit

Permalink
Fix server API + add simple doc
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-wosinek committed Dec 23, 2024
1 parent 3f0a63e commit b592bde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const app = express(),
app.use(bodyParser.json());

app.get('/api', (req, res) => {
res.send({ message: 'Welcome to Oh-my bill server' });
res.send({
message: 'Welcome to Oh-my bill server',
tariff: 'GET /tariff to read tariff info, POST /tariff to update',
measurements:
'GET /measurements to read data, POST /measurements/add-new to add data',
});
});

app.get('/tariff', (req, res) => {
Expand Down
1 change: 0 additions & 1 deletion server/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
compiler: 'tsc',
main: './src/main.ts',
tsConfig: './tsconfig.app.json',
assets: ['./src/assets'],
optimization: false,
outputHashing: 'none',
generatePackageJson: true,
Expand Down

0 comments on commit b592bde

Please sign in to comment.