Skip to content

Commit

Permalink
✨ add web login & register page
Browse files Browse the repository at this point in the history
  • Loading branch information
ileostar committed Jan 17, 2024
1 parent c45e370 commit 0cefbe5
Show file tree
Hide file tree
Showing 118 changed files with 27,517 additions and 1,870 deletions.
4 changes: 0 additions & 4 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
auto-install-peers = true
node-linker=hoisted
package-lock=true
shamefully-hoist=true
strict-peer-dependencies=false
shell-emulator=true
12 changes: 12 additions & 0 deletions apps/server/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
2 changes: 0 additions & 2 deletions apps/server/.env.example

This file was deleted.

4 changes: 2 additions & 2 deletions apps/server/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
"@ileostar"
],
root: true,
env: {
Expand Down
1 change: 1 addition & 0 deletions apps/server/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: ileostar
9 changes: 9 additions & 0 deletions apps/server/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
commit-message:
prefix: build
include: scope
36 changes: 36 additions & 0 deletions apps/server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vercel
4 changes: 0 additions & 4 deletions apps/server/.prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions apps/server/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nuxt.isNuxtApp": false
}
31 changes: 0 additions & 31 deletions apps/server/Dockerfile

This file was deleted.

83 changes: 40 additions & 43 deletions apps/server/README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,70 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description
## 项目描述

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
该项目是一个练手项目,使用[Nest](https://github.com/nestjs/nest)框架进行编写,这里因为采用的是serveless服务形式,使用的是vercel服务+远程数据库(阿里云/腾讯云数据库/[ElephantSQL
](https://www.elephantsql.com/))的形式部署

## Installation
## 安装

```bash
$ npm install
pnpm install
```

## Running the app
## 更换数据库

`src/config/configurations.ts`下面更换数据库信息

这里使用了TypeORM,如果远程数据库没有这个表会自动创建,
但是得先要创建一个空的数据库

```typescript
function loadConfig() {
return {
db: {
database: 'three-wheel', // <-----必须先创建空的数据库three-wheel(也可以改成新的数据库名)
// ...more
},
}
}
```

## 运行

```bash
# development
$ npm run start
$ pnpm run start

# watch mode
$ npm run start:dev
$ pnpm run start:dev

# production mode
$ npm run start:prod
$ pnpm run start:prod
```

## Test
## 测试

```bash
# unit tests
$ npm run test
$ pnpm run test

# e2e tests
$ npm run test:e2e
$ pnpm run test:e2e

# test coverage
$ npm run test:cov
$ pnpm run test:cov
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch
export default loadConfig

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)
## 部署

## License
```bash
# 登陆vercel
$ vercel login

Nest is [MIT licensed](LICENSE).
# 部署到vercel
$ pnpm vercel
```
7 changes: 6 additions & 1 deletion apps/server/nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src"
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true,
"plugins": ["@nestjs/swagger"]
}
}
23 changes: 23 additions & 0 deletions apps/server/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"restartable": "rs",
"ignore": [
".git",
".svn",
"logs",
"pem",
"node_modules/**/node_modules",
"src/**/*.spec.ts"
],
"verbose": true,
"execMap": {
"js": "node server/index.js"
},
"watch": [
"src"
],
"env": {
"NODE_ENV": "development"
},
"ext": "ts js json",
"exec": "ts-node -r tsconfig-paths/register src/main.ts"
}
Loading

0 comments on commit 0cefbe5

Please sign in to comment.