forked from notBrad/bubo-rss
Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6aa4dc80b3 | ||
|
b9a7da4287 | ||
|
1b3f20379a | ||
|
89dbf2c17a | ||
|
b429c213b8 | ||
|
1a9c60a4d6 | ||
|
57571db322 | ||
|
6fca9e15be | ||
|
6dbd6bfe02 | ||
|
29e2188b2e | ||
|
415bfb6c73 | ||
|
a5ff96e449 | ||
|
1cd365e257 | ||
|
d124194296 | ||
|
713a4eedaa | ||
|
53843e949e | ||
|
949bea60b3 | ||
|
ceaad6c5b4 | ||
|
fbfda83125 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
node_modules/*
|
||||
public/index.html
|
||||
dist/*
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
|
@ -1,4 +0,0 @@
|
||||
[build]
|
||||
command = "npm run build:bubo"
|
||||
publish = "./public/"
|
||||
|
@ -10,7 +10,9 @@
|
||||
"clean": "rm -rf dist",
|
||||
"build": "tsc",
|
||||
"bubo": "node dist/index.js",
|
||||
"build:bubo": "tsc && node dist/index.js"
|
||||
"build:bubo": "tsc && node dist/index.js",
|
||||
"start": "npm run build:bubo; node server.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": {
|
||||
"name": "George Mandis",
|
||||
@ -30,8 +32,10 @@
|
||||
"chalk": "^5.1.2",
|
||||
"node-fetch": "^3.3.0",
|
||||
"nunjucks": "^3.2.3",
|
||||
"rss-parser": "^3.12.0"
|
||||
"rss-parser": "^3.12.0",
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"engines": { "node": "16.x" },
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.18.4",
|
||||
"@types/nunjucks": "^3.2.1",
|
||||
|
24
server.js
Normal file
24
server.js
Normal file
@ -0,0 +1,24 @@
|
||||
// Bubo RSS (on Glitch!)
|
||||
|
||||
// init project
|
||||
import express from "express";
|
||||
import { URL } from 'url';
|
||||
const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
const app = express();
|
||||
|
||||
// we've started you off with Express,
|
||||
// but feel free to use whatever libs or frameworks you'd like through `package.json`.
|
||||
|
||||
// http://expressjs.com/en/starter/static-files.html
|
||||
app.use(express.static("public"));
|
||||
|
||||
// http://expressjs.com/en/starter/basic-routing.html
|
||||
app.get("/", function(request, response) {
|
||||
response.sendFile(__dirname + "/public/index.html");
|
||||
});
|
||||
|
||||
// listen for requests :)
|
||||
const listener = app.listen(process.env.PORT, function() {
|
||||
console.log("Your app is listening on port " + listener.address().port);
|
||||
});
|
Loading…
Reference in New Issue
Block a user