Skip to content

Commit 28bef9f

Browse files
committed
adding app.js stuff
1 parent 0c89e18 commit 28bef9f

File tree

4 files changed

+1124
-1
lines changed

4 files changed

+1124
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,24 @@ HandleLidSwitchDocked=ignore
124124
* restart and set the changes `sudo systemctl restart systemd-logind.service`
125125

126126

127-
# SETUP RASPI:
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
# SETUP RASPI (OLD!!!!):
128145

129146
## INITIAL SETUP
130147

pi_plug/app.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const express = require('express');
2+
3+
const app = express();
4+
5+
app.get('/on', (req, res) => {
6+
res.send('power on');
7+
});
8+
9+
app.get('/off', (req, res) => {
10+
res.send('power off');
11+
});
12+
13+
app.listen(3000, () => console.log('Example app is listening on port 3000.'));

0 commit comments

Comments
 (0)