serve static
This commit is contained in:
parent
cd56664442
commit
d7ef06b487
6 changed files with 9 additions and 3 deletions
|
|
@ -15,5 +15,5 @@ Note: I'm assuming you're running Ubuntu 22.04.
|
||||||
|
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
* You can get the dev containers up and running with `npm run start:containers`.
|
* You can get the dev containers up and running with `npm run start:containers`. You can visit the app at `localhost`.
|
||||||
* If you would rather only run the express app locally, you can just do `npm run start` instead.
|
* If you would rather only run the express app locally, you can just do `npm run start` instead.
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ services:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./caddy:/etc/caddy
|
- ./caddy:/etc/caddy
|
||||||
|
networks:
|
||||||
|
- app_network
|
||||||
depends_on:
|
depends_on:
|
||||||
- express
|
- express
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@
|
||||||
"start": "node src/app.js",
|
"start": "node src/app.js",
|
||||||
"start:containers": "docker compose up -d --build",
|
"start:containers": "docker compose up -d --build",
|
||||||
"stop:containers": "docker compose down",
|
"stop:containers": "docker compose down",
|
||||||
"purge-dev-data": "rm -rf ./container-data",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|
@ -33,6 +33,8 @@ const apiRoutes = require('./routes/apiRoutes');
|
||||||
app.use('/', webRoutes);
|
app.use('/', webRoutes);
|
||||||
app.use('/api', apiRoutes);
|
app.use('/api', apiRoutes);
|
||||||
|
|
||||||
|
app.use(express.static(path.join(__dirname, 'public')));
|
||||||
|
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`Server started on port ${port}`);
|
console.log(`Server started on port ${port}`);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
BIN
src/public/kitty.jpeg
Normal file
BIN
src/public/kitty.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
|
|
@ -13,6 +13,9 @@
|
||||||
<p>Your session's UUID: <%= uuid %>
|
<p>Your session's UUID: <%= uuid %>
|
||||||
</p>
|
</p>
|
||||||
<p id="pubkey-p" style="display:none">And your pubkey is: <span id="pubkey-span"></span></p>
|
<p id="pubkey-p" style="display:none">And your pubkey is: <span id="pubkey-span"></span></p>
|
||||||
|
<hr>
|
||||||
|
<p>Here's a kitty, cause why not</p>
|
||||||
|
<img width="300px" src="kitty.jpeg" alt="">
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue