api express
This commit is contained in:
parent
b3fd6ea195
commit
b5c59cbddb
1167
api/package-lock.json
generated
1167
api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,13 +6,19 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "ts-node-dev ./src/index.ts",
|
||||
"dev": "ts-node-dev --respawn --transpile-only ./src/index.ts",
|
||||
"start": "npm run build && node ./dist/index.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/node": "^18.7.18",
|
||||
"ts-node": "^10.9.1",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"typescript": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.18.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { test } from '@core';
|
||||
import cors from 'cors';
|
||||
import express from 'express';
|
||||
|
||||
const b: test = {
|
||||
a: 'ui'
|
||||
}
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
app.use(cors());
|
||||
app.get('/', (req, res) => res.send('coucou\n'));
|
||||
|
||||
console.log(b);
|
||||
console.log("coucou toi");
|
||||
app.listen(8000, () => console.log('running...'));
|
||||
|
@ -4,8 +4,8 @@
|
||||
"esModuleInterop": true,
|
||||
"target": "es6",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"sourceMap": false,
|
||||
"paths": {
|
||||
"@core": [
|
||||
"../core/src"
|
||||
|
@ -3,7 +3,7 @@
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"composite": true,
|
||||
"sourceMap": true,
|
||||
"sourceMap": false,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
|
1
www/src/global.d.ts
vendored
Normal file
1
www/src/global.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference types="svelte" />
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "@tsconfig/svelte/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": false,
|
||||
"paths": {
|
||||
"@core": [
|
||||
"../core/src"
|
||||
|
Loading…
x
Reference in New Issue
Block a user