Install NodeJS, TypeScript, ExpressJS and ESLint
Install NodeJS, TypeScript, ExpressJS and ESLint with initial configuration files. Add initial instructions to README.md
This commit is contained in:
parent
a37c58ed5e
commit
74c1ee1b7b
6 changed files with 2592 additions and 0 deletions
17
README.md
17
README.md
|
@ -1,2 +1,19 @@
|
||||||
# ProjectMark-Rodrigo
|
# ProjectMark-Rodrigo
|
||||||
|
|
||||||
Take home test for ProjectMark
|
Take home test for ProjectMark
|
||||||
|
|
||||||
|
## Run the project
|
||||||
|
|
||||||
|
This project requires NodeJS version 19 or newer.
|
||||||
|
|
||||||
|
- Install dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Start project:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run start
|
||||||
|
```
|
||||||
|
|
16
eslint.config.mjs
Normal file
16
eslint.config.mjs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import globals from "globals";
|
||||||
|
import js from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{ files: ["**/*.{js,mjs,cjs,ts}"] },
|
||||||
|
{ files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: globals.browser } },
|
||||||
|
{ files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] },
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{ rules: {
|
||||||
|
"no-undef": "off",
|
||||||
|
"@typescript-eslint/no-require-imports": "off"
|
||||||
|
} },
|
||||||
|
]);
|
2503
package-lock.json
generated
Normal file
2503
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
34
package.json
Normal file
34
package.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"name": "projectmark-rodrigo",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Take home test for ProjectMark",
|
||||||
|
"main": "dist/app.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "tsc && node dist/app.js",
|
||||||
|
"lint": "eslint . --ext .ts",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/Rodrigoplp/ProjectMark-Rodrigo.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"type": "commonjs",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/Rodrigoplp/ProjectMark-Rodrigo/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/Rodrigoplp/ProjectMark-Rodrigo#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.23.0",
|
||||||
|
"@types/express": "^5.0.1",
|
||||||
|
"eslint": "^9.23.0",
|
||||||
|
"globals": "^16.0.0",
|
||||||
|
"typescript": "^5.8.2",
|
||||||
|
"typescript-eslint": "^8.29.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^5.1.0"
|
||||||
|
}
|
||||||
|
}
|
11
src/app.ts
Normal file
11
src/app.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import express from 'express'
|
||||||
|
const app = express()
|
||||||
|
const port = 3000
|
||||||
|
|
||||||
|
app.get('/', (req, res) => {
|
||||||
|
res.send('Hello World!')
|
||||||
|
})
|
||||||
|
|
||||||
|
app.listen(port, () => {
|
||||||
|
return console.log(`Express is listening at http://localhost:${port}`)
|
||||||
|
})
|
11
tsconfig.json
Normal file
11
tsconfig.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"target": "es6",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"sourceMap": true,
|
||||||
|
"outDir": "dist"
|
||||||
|
},
|
||||||
|
"lib": ["es2015"]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue