Skip to content

Commit 5a4d3e0

Browse files
committed
Initial commit
0 parents  commit 5a4d3e0

File tree

333 files changed

+54127
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+54127
-0
lines changed

.replit

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
entrypoint = "index.js"
2+
3+
hidden = [".config"]
4+
5+
[interpreter]
6+
command = [
7+
"prybar-nodejs",
8+
"-q",
9+
"--ps1",
10+
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
11+
"-i"
12+
]
13+
14+
[[hints]]
15+
regex = "Error \\[ERR_REQUIRE_ESM\\]"
16+
message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"
17+
18+
[nix]
19+
channel = "stable-21_11"
20+
21+
[env]
22+
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
23+
XDG_CONFIG_HOME = "/home/runner/.config"
24+
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
25+
26+
[gitHubImport]
27+
requiredFiles = [".replit", "replit.nix", ".config"]
28+
29+
[packager]
30+
language = "nodejs"
31+
32+
[packager.features]
33+
packageSearch = true
34+
guessImports = true
35+
enabledForHosting = false
36+
37+
[unitTest]
38+
language = "nodejs"
39+
40+
[debugger]
41+
support = true
42+
43+
[debugger.interactive]
44+
transport = "localhost:0"
45+
startCommand = [ "dap-node" ]
46+
47+
[debugger.interactive.initializeMessage]
48+
command = "initialize"
49+
type = "request"
50+
51+
[debugger.interactive.initializeMessage.arguments]
52+
clientID = "replit"
53+
clientName = "replit.com"
54+
columnsStartAt1 = true
55+
linesStartAt1 = true
56+
locale = "en-us"
57+
pathFormat = "path"
58+
supportsInvalidatedEvent = true
59+
supportsProgressReporting = true
60+
supportsRunInTerminalRequest = true
61+
supportsVariablePaging = true
62+
supportsVariableType = true
63+
64+
[debugger.interactive.launchMessage]
65+
command = "launch"
66+
type = "request"
67+
68+
[debugger.interactive.launchMessage.arguments]
69+
args = []
70+
console = "externalTerminal"
71+
cwd = "."
72+
environment = []
73+
pauseForSourceMap = false
74+
program = "./index.js"
75+
request = "launch"
76+
sourceMaps = true
77+
stopOnEntry = false
78+
type = "pwa-node"
79+
80+
[languages]
81+
82+
[languages.javascript]
83+
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
84+
85+
[languages.javascript.languageServer]
86+
start = "typescript-language-server --stdio"
87+
88+
[deployment]
89+
run = ["node", "index.js"]
90+
deploymentTarget = "cloudrun"

index.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const express = require('express'); // Duh
2+
3+
const app = express();
4+
app.use(express.static('public'));
5+
6+
app.get('/', function (req, res) {
7+
if (req.header('X-Replit-User-Id')) { // Check to see if the user is logged in...
8+
res.redirect(`/home/?user=${req.header('X-Replit-User-Name')}`); // They are logged in, redirect them to the home page.
9+
} else {
10+
res.sendFile(__dirname + '/public/login.html'); // Send a login page if they are not.
11+
}
12+
});
13+
14+
app.get('/home', function (req, res) {
15+
// You could do anything you want here...
16+
// You might want to secure it a little, so people have to be logged in to view the page.
17+
res.send(`<h1>Hello, ${req.query.user}</h1>`); // You could modify this to render a template, or store the user in a database...
18+
});
19+
20+
app.listen(8080, function () { // Start the server
21+
console.log('Server up!');
22+
});

node_modules/.bin/mime

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/accepts/HISTORY.md

+236
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/accepts/LICENSE

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)