Typescript here we come IG
This commit is contained in:
parent
44530ff327
commit
6cf8a02100
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
/target
|
||||
*.swp
|
||||
api/dist/
|
||||
api/node_modules/
|
||||
|
2495
api/package-lock.json
generated
Normal file
2495
api/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
api/package.json
Normal file
24
api/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"node": "^23.9.0",
|
||||
"npm": "^11.2.0"
|
||||
},
|
||||
"name": "api",
|
||||
"version": "1.0.0",
|
||||
"description": "HTTP API component for bubble",
|
||||
"main": "dist/main.js",
|
||||
"devDependencies": {
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "tsc",
|
||||
"debug": "node dist/main.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.shockrah.xyz:2222/shockrah/bubble.git"
|
||||
},
|
||||
"author": "shockrah",
|
||||
"license": "MIT"
|
||||
}
|
1
api/src/main.ts
Normal file
1
api/src/main.ts
Normal file
@ -0,0 +1 @@
|
||||
console.log('asdf')
|
20
api/tsconfig.json
Normal file
20
api/tsconfig.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"rootDir": "./src/",
|
||||
"outDir": "./dist/",
|
||||
"importHelpers": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
||||
|
8
dev.py
8
dev.py
@ -23,12 +23,6 @@ if __name__ == '__main__':
|
||||
'--check-container',
|
||||
help='Execs into the given container with bash for debugging'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-a',
|
||||
'--api-run',
|
||||
help='Runs the debug version of the api',
|
||||
action='store_true'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
os.environ['DB_CONNECTION_STRING'] = args.db_url
|
||||
if args.init_db:
|
||||
@ -39,5 +33,3 @@ if __name__ == '__main__':
|
||||
)
|
||||
if args.check_container:
|
||||
run(f'docker exec -it {args.check_container} bash'.split())
|
||||
if args.api_run:
|
||||
run( f'cargo run --bin api -- -p {args.db_url}'.split())
|
||||
|
Loading…
Reference in New Issue
Block a user