...
This commit is contained in:
parent
d471614837
commit
c845f1f6c5
|
@ -3,16 +3,16 @@ import pluginJs from "@eslint/js";
|
|||
|
||||
export default [
|
||||
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
||||
pluginJs.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
"prefer-const": "off",
|
||||
"quotes": ["warn", "double", { "allowTemplateLiterals": true }],
|
||||
"no-unused-vars": "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",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -601,6 +602,17 @@
|
|||
"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": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
require("dotenv").config();
|
||||
const express = require("express");
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.send("Hello");
|
||||
});
|
||||
|
||||
app.listen(3000);
|
||||
app.listen(PORT);
|
||||
|
|
Loading…
Reference in New Issue