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,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"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"
|
"start": "npm run build && node ./dist/index.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/cors": "^2.8.12",
|
||||||
|
"@types/express": "^4.17.14",
|
||||||
"@types/node": "^18.7.18",
|
"@types/node": "^18.7.18",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"ts-node-dev": "^2.0.0",
|
"ts-node-dev": "^2.0.0",
|
||||||
"typescript": "^4.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 = {
|
const app = express();
|
||||||
a: 'ui'
|
app.use(express.json());
|
||||||
}
|
app.use(cors());
|
||||||
|
app.get('/', (req, res) => res.send('coucou\n'));
|
||||||
|
|
||||||
console.log(b);
|
app.listen(8000, () => console.log('running...'));
|
||||||
console.log("coucou toi");
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"sourceMap": true,
|
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
|
"sourceMap": false,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@core": [
|
"@core": [
|
||||||
"../core/src"
|
"../core/src"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"sourceMap": true,
|
"sourceMap": false,
|
||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": [
|
"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",
|
"extends": "@tsconfig/svelte/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"sourceMap": false,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@core": [
|
"@core": [
|
||||||
"../core/src"
|
"../core/src"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user