Popravek crasha ob šumnikih v imenih datotek s članki.
This commit is contained in:
17
.vscode/launch.json
vendored
Normal file
17
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "pwa-node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Program",
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
"program": "${workspaceFolder}\\index.js"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -24,7 +24,7 @@ ${contents}
|
|||||||
}
|
}
|
||||||
|
|
||||||
function articles_item(request, response) {
|
function articles_item(request, response) {
|
||||||
var article = fs.readFileSync('./articles/' + request.params.item);
|
var article = fs.readFileSync('./articles/' + decodeURIComponent(request.params.item));
|
||||||
response.send(`20 text/gemini\r\n
|
response.send(`20 text/gemini\r\n
|
||||||
${article}
|
${article}
|
||||||
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/* GET home page. */
|
|
||||||
function index(request, response) {
|
|
||||||
var adminBlock = "";
|
|
||||||
if(request.clientCert.fingerprint == '96:19:A6:91:57:AF:E2:D3:E0:80:FC:35:4E:BD:2A:46:C9:2D:CB:53') {
|
|
||||||
adminBlock = '## Administration\r\n=> /admin Administration';
|
|
||||||
}
|
|
||||||
response.send(`20 text/gemini\r\n
|
|
||||||
\`\`\` Uplink:SI Logo
|
|
||||||
■ ■ ■ ■ _ _ ____ _ _ _ _ _ _ ____ _ ■ ■ ■ ■
|
|
||||||
■ ■ ■ | | |__/ | | |\\ | |_/ / [__ | ■ ■ ■
|
|
||||||
■ ■ \\__/ | |___ | | \\| | \\_ / ___] | ■ ■
|
|
||||||
■ ■
|
|
||||||
-=Est. 2021=-
|
|
||||||
\`\`\`
|
|
||||||
Uplink is my conection to the Gemini Space. It is to become a great site. At this moment I will be publishing my own articles, my own content.
|
|
||||||
# Uplink:SI
|
|
||||||
|
|
||||||
## About this server
|
|
||||||
Uplink.si started about ten years ago. A long time in Internet time. First it was running on free dynamic domains but at some point Uplink.si was registered. The server was always running HTTP and Gopher servers. I was always fascinated by old technologies, primarily because they were simple to understand fully. Back then I wrote a small gopher+ server and client. Now Gemini came along. Gemini is similar to Gopher in that fascinating simplicity. I was able to write a server in about 100 lines of JavaScript and it worked.
|
|
||||||
|
|
||||||
This server is evolution of the one I wrote in that one weekend. It is a bit more advanced, it resembles Express framework for NodeJS. That architecture should make it a bit easier to expand.
|
|
||||||
|
|
||||||
## Articles
|
|
||||||
=> /articles/ Articles
|
|
||||||
${adminBlock}
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = index;
|
|
Reference in New Issue
Block a user