mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
eslint working, except semi rule
This commit is contained in:
parent
e660b7fe33
commit
c7d1ed4adc
2
package-lock.json
generated
2
package-lock.json
generated
@ -30,6 +30,7 @@
|
||||
"eslint-plugin-vitest": "^0.3.10",
|
||||
"eslint-plugin-yml": "^1.10.0",
|
||||
"nodemon": "^3.0.1",
|
||||
"prettier": "^3.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsc": "^2.0.4",
|
||||
"tsc-watch": "^6.0.4",
|
||||
@ -4395,7 +4396,6 @@
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
|
||||
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
"eslint-plugin-vitest": "^0.3.10",
|
||||
"eslint-plugin-yml": "^1.10.0",
|
||||
"nodemon": "^3.0.1",
|
||||
"prettier": "^3.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsc": "^2.0.4",
|
||||
"tsc-watch": "^6.0.4",
|
||||
|
||||
16
src/index.ts
16
src/index.ts
@ -14,6 +14,7 @@ const resolvers = {
|
||||
};
|
||||
|
||||
async function listen(port: number) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const app: any = express();
|
||||
|
||||
const server = new ApolloServer({
|
||||
@ -24,21 +25,16 @@ async function listen(port: number) {
|
||||
|
||||
server.applyMiddleware({ app, path: "/" });
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
app.listen(port).once("listening", resolve).once("error", reject);
|
||||
});
|
||||
return app.listen(port);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
await listen(4000);
|
||||
console.log("🚀 Server is ready at http://localhost:4000/graphql");
|
||||
} catch (err) {
|
||||
console.error("💀 Error starting the node server", err);
|
||||
}
|
||||
await listen(4000);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("🚀 Server is ready at http://localhost:4000/graphql");
|
||||
}
|
||||
|
||||
void main().catch((e) => {
|
||||
main().catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
throw e;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user