-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 051a301
Showing
882 changed files
with
201,827 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
entrypoint = "index.js" | ||
|
||
hidden = [".config"] | ||
|
||
[interpreter] | ||
command = [ | ||
"prybar-nodejs", | ||
"-q", | ||
"--ps1", | ||
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ", | ||
"-i" | ||
] | ||
|
||
[[hints]] | ||
regex = "Error \\[ERR_REQUIRE_ESM\\]" | ||
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)" | ||
|
||
[nix] | ||
channel = "stable-22_05" | ||
|
||
[env] | ||
XDG_CONFIG_HOME = "/home/runner/.config" | ||
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin" | ||
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global" | ||
|
||
[gitHubImport] | ||
requiredFiles = [".replit", "replit.nix", ".config"] | ||
|
||
[packager] | ||
language = "nodejs" | ||
|
||
[packager.features] | ||
packageSearch = true | ||
guessImports = true | ||
enabledForHosting = false | ||
|
||
[unitTest] | ||
language = "nodejs" | ||
|
||
[debugger] | ||
support = true | ||
|
||
[debugger.interactive] | ||
transport = "localhost:0" | ||
startCommand = [ "dap-node" ] | ||
|
||
[debugger.interactive.initializeMessage] | ||
command = "initialize" | ||
type = "request" | ||
|
||
[debugger.interactive.initializeMessage.arguments] | ||
clientID = "replit" | ||
clientName = "replit.com" | ||
columnsStartAt1 = true | ||
linesStartAt1 = true | ||
locale = "en-us" | ||
pathFormat = "path" | ||
supportsInvalidatedEvent = true | ||
supportsProgressReporting = true | ||
supportsRunInTerminalRequest = true | ||
supportsVariablePaging = true | ||
supportsVariableType = true | ||
|
||
[debugger.interactive.launchMessage] | ||
command = "launch" | ||
type = "request" | ||
|
||
[debugger.interactive.launchMessage.arguments] | ||
args = [] | ||
console = "externalTerminal" | ||
cwd = "." | ||
environment = [] | ||
pauseForSourceMap = false | ||
program = "./index.js" | ||
request = "launch" | ||
sourceMaps = true | ||
stopOnEntry = false | ||
type = "pwa-node" | ||
|
||
[languages] | ||
|
||
[languages.javascript] | ||
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}" | ||
|
||
[languages.javascript.languageServer] | ||
start = "typescript-language-server --stdio" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"title": ["Hello world"], | ||
"posturl": ["test"], | ||
"content": ["My first blog post"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Declare express | ||
const express = require('express'); | ||
|
||
// Declare database and requitment | ||
const JSONdb = require('simple-json-db'); | ||
const db = new JSONdb('database.json'); | ||
|
||
// Declare port | ||
const app = express(); | ||
const port = 4040; | ||
|
||
// Set view engine | ||
app.set('view engine', 'ejs'); | ||
|
||
// Set main page | ||
app.get('/', (req, res) => { | ||
app.locals.title = db.get('title'); | ||
app.locals.postUrl = db.get('posturl'); | ||
|
||
res.render('index'); | ||
}) | ||
|
||
// Set blog page | ||
app.get('/post/:posturl', (req, res) => { | ||
postUrl = req.params.posturl; | ||
dbIndex = db.get('posturl').indexOf(postUrl); | ||
|
||
if (dbIndex != -1) { | ||
app.locals.title = db.get('title')[dbIndex]; | ||
app.locals.content = db.get('content')[dbIndex]; | ||
|
||
res.render('post'); | ||
} else { | ||
res.send('Page not found :(') | ||
} | ||
}); | ||
|
||
// Run app | ||
app.listen(port, () => { | ||
console.log('App is live'); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.