mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Initial commit
This commit is contained in:
parent
c815a52b37
commit
afcfd12d87
10 changed files with 4496 additions and 0 deletions
23
packages/core/.gitignore
vendored
Normal file
23
packages/core/.gitignore
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
3
packages/core/.prettierrc
Normal file
3
packages/core/.prettierrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"printWidth": 100
|
||||
}
|
5
packages/core/.vscode/extensions.json
vendored
Normal file
5
packages/core/.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"samverschueren.linter-xo"
|
||||
]
|
||||
}
|
4
packages/core/.vscode/settings.json
vendored
Normal file
4
packages/core/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"editor.defaultFormatter": "samverschueren.linter-xo"
|
||||
}
|
4
packages/core/.xo-config.json
Normal file
4
packages/core/.xo-config.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"space": true,
|
||||
"prettier": true
|
||||
}
|
13
packages/core/README.md
Normal file
13
packages/core/README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Logto Provider
|
||||
|
||||
The backend for Logto auth service.
|
||||
|
||||
## Get Started
|
||||
|
||||
```bash
|
||||
yarn && yarn dev
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
Upgrade `xo` after [this issue](https://github.com/SamVerschueren/vscode-linter-xo/issues/91) is solved.
|
22
packages/core/package.json
Normal file
22
packages/core/package.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "@logto/provider",
|
||||
"version": "1.0.0",
|
||||
"description": "The backend for Logto auth service.",
|
||||
"main": "index.js",
|
||||
"author": "Logto",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "xo src/",
|
||||
"dev": "tsc-watch --onSuccess \"node ./build/index.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"koa": "^2.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/koa": "^2.13.3",
|
||||
"tsc-watch": "^4.4.0",
|
||||
"typescript": "^4.3.2",
|
||||
"xo": "0.39.1"
|
||||
}
|
||||
}
|
13
packages/core/src/index.ts
Normal file
13
packages/core/src/index.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Koa from 'koa';
|
||||
|
||||
const app = new Koa();
|
||||
|
||||
app.use((ctx) => {
|
||||
ctx.body = 'Hello, world!';
|
||||
});
|
||||
|
||||
const PORT = 3000;
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`App is listening on port ${PORT}`);
|
||||
});
|
16
packages/core/tsconfig.json
Normal file
16
packages/core/tsconfig.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2021",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "build"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
4393
packages/core/yarn.lock
Normal file
4393
packages/core/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue