Install and run prettier
All checks were successful
/ prettier (push) Successful in 1m35s

This commit is contained in:
9pfs 2024-07-06 01:14:20 +00:00
parent ffd28572f0
commit dd071e9854
Signed by: 9pfs
SSH key fingerprint: SHA256:TOcGxMQCfy4VvRM8AzgXErKXdkAtaTcpGXgYMpyoJoY
10 changed files with 49 additions and 17 deletions

View file

@ -0,0 +1,13 @@
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
prettier:
runs-on: docker
steps:
- uses: actions/checkout@v3
- id: dependencies
run: NODE_ENV=development npm ci
- id: prettier
run: npx prettier --check .

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"editor.tabSize": 2
}

2
README
View file

@ -2,4 +2,4 @@ This is a random project of mine that I spontaneously decided to start working o
I did something like this in the past, but I have no idea what happened to it, and it's not public, so let's just call this one the first. I did something like this in the past, but I have no idea what happened to it, and it's not public, so let's just call this one the first.
Feel free to contribute if you want :) Feel free to contribute if you want :)
In case you're wondering what this is going to be: In case you're wondering what this is going to be:
I'm trying to create a website that lets people submit questions and associated answers to it for others to see. In other words, a FAQ website :) I'm trying to create a website that lets people submit questions and associated answers to it for others to see. In other words, a FAQ website :)

16
package-lock.json generated
View file

@ -18,6 +18,7 @@
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/node": "^20.14.10", "@types/node": "^20.14.10",
"prettier": "^3.3.2",
"prisma": "^5.16.1" "prisma": "^5.16.1"
} }
}, },
@ -657,6 +658,21 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
}, },
"node_modules/prettier": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prisma": { "node_modules/prisma": {
"version": "5.16.1", "version": "5.16.1",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-5.16.1.tgz", "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.16.1.tgz",

View file

@ -16,6 +16,7 @@
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/node": "^20.14.10", "@types/node": "^20.14.10",
"prettier": "^3.3.2",
"prisma": "^5.16.1" "prisma": "^5.16.1"
}, },
"bin": { "bin": {

View file

@ -2,15 +2,14 @@ import express from "express";
import faqRouter from "./routes/index.js"; import faqRouter from "./routes/index.js";
const app = express(); const app = express();
app.use(faqRouter); app.use(faqRouter);
var listenPort = parseInt(process.env.PORT)||3919; var listenPort = parseInt(process.env.PORT) || 3919;
var listenHost = process.env.HOST||"127.0.0.1"; var listenHost = process.env.HOST || "127.0.0.1";
if(listenHost[0]!="/") { if (listenHost[0] != "/") {
app.listen(listenPort, listenHost, () => { app.listen(listenPort, listenHost, () => {
console.log(`Listening on ${listenHost}:${listenPort}`); console.log(`Listening on ${listenHost}:${listenPort}`);
}); });
} } else {
else {
app.listen(listenHost, () => { app.listen(listenHost, () => {
console.log(`Listening on ${listenHost} (unix socket)`); console.log(`Listening on ${listenHost} (unix socket)`);
}) });
} }