...
This commit is contained in:
parent
d471614837
commit
c845f1f6c5
|
@ -3,16 +3,16 @@ import pluginJs from "@eslint/js";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
|
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
|
||||||
{ languageOptions: { globals: globals.browser } },
|
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
||||||
pluginJs.configs.recommended,
|
pluginJs.configs.recommended,
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
"prefer-const": "off",
|
"prefer-const": "off",
|
||||||
"quotes": ["warn", "double", { "allowTemplateLiterals": true }],
|
|
||||||
"no-unused-vars": "warn",
|
"no-unused-vars": "warn",
|
||||||
"no-multi-spaces": "warn",
|
"no-multi-spaces": "warn",
|
||||||
"no-multiple-empty-lines": ["warn", { "max": 1 }],
|
"no-case-declarations": "off",
|
||||||
"no-case-declarations": "off"
|
"no-multiple-empty-lines": ["warn", { max: 1 }],
|
||||||
}
|
quotes: ["warn", "double", { allowTemplateLiterals: true }],
|
||||||
}
|
},
|
||||||
|
},
|
||||||
];
|
];
|
|
@ -9,6 +9,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"dotenv": "^16.4.5",
|
||||||
"express": "^4.19.2"
|
"express": "^4.19.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -601,6 +602,17 @@
|
||||||
"npm": "1.2.8000 || >= 1.4.16"
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dotenv": {
|
||||||
|
"version": "16.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
|
||||||
|
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://dotenvx.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ee-first": {
|
"node_modules/ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"dotenv": "^16.4.5",
|
||||||
"express": "^4.19.2"
|
"express": "^4.19.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
require("dotenv").config();
|
||||||
const express = require("express");
|
const express = require("express");
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
const PORT = process.env.PORT
|
||||||
|
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
res.send("Hello");
|
res.send("Hello");
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(3000);
|
app.listen(PORT);
|
||||||
|
|
Loading…
Reference in New Issue