Skip to content

Commit

Permalink
refactor: 整理
Browse files Browse the repository at this point in the history
  • Loading branch information
lkzc19 committed Jul 26, 2024
1 parent 52ddfc1 commit 04b9c4e
Show file tree
Hide file tree
Showing 105 changed files with 272 additions and 79 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/demo-sl-nuxt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: demo-sl-nuxt

on:
workflow_dispatch:
push:
paths:
- 'v-demo/demo-sl/sl-nuxt/**'

env:
WORKSPACE: 'v-demo/demo-sl/sl-nuxt'
IMAGE_NAME: 'ghcr.io/lkzc19/demo-sl-nuxt'

jobs:
sl-nuxt-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: NPM
run: |
cd ${{ env.WORKSPACE }}
npm install
npm run build
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v2
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build and push docker image'
uses: docker/build-push-action@v5
with:
context: ${{ env.WORKSPACE }}
platforms: |
linux/amd64
linux/arm64
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: shortlink-spring
name: demo-sl-spring

on:
workflow_dispatch:
Expand All @@ -7,11 +7,11 @@ on:
- 'v-demo/shortlink/shortlink-spring/**'

env:
PROJECT_PATH: 'v-demo/shortlink/shortlink-spring'
IMAGE_NAME: 'ghcr.io/lkzc19/demo.shortlink-spring'
WORKSPACE: 'v-demo/demo-sl/sl-spring'
IMAGE_NAME: 'ghcr.io/lkzc19/demo-sl-spring'

jobs:
shortlink-spring:
sl-spring-bulid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +22,7 @@ jobs:
distribution: 'temurin'
- name: 'Package gradle project'
run: |
cd ${{ env.PROJECT_PATH }}
cd ${{ env.WORKSPACE }}
./gradlew bootJar
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v2
Expand All @@ -35,8 +35,7 @@ jobs:
- name: 'Build and push docker image'
uses: docker/build-push-action@v5
with:
context: ${{ env.PROJECT_PATH }}
file: ${{ env.PROJECT_PATH }}/Dockerfile
context: ${{ env.WORKSPACE }}
platforms: |
linux/amd64
linux/arm64
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions v-demo/demo-fhm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# demo-fhm

fhm(Five Hundred Miles) 离歌
76 changes: 10 additions & 66 deletions v-demo/demo-fs/fs-nuxt/README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,19 @@
# Nuxt 3 Minimal Starter
# fs-nuxt

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:
# 项目所需的一些命令

```bash
# npm
# 依赖
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
# 开发
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
# 打包
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
# 打包后预览
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
# 文档

- [nuxt3](https://nuxt.com/)
- [tailwind](https://tailwind.nodejs.cn/)
6 changes: 6 additions & 0 deletions v-demo/demo-fs/fs-spring/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions v-demo/demo-fs/fs-spring/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.example.config

import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration
class WebMvcConfig : WebMvcConfigurer {

override fun addCorsMappings(registry: CorsRegistry) {
registry
.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("*")
.allowedHeaders("*")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.example.controller

import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@RestController
class TestController {

@GetMapping("/ping")
fun ping(): String {
return "pong..."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.example.service

interface FileService {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.example.service.impl

import org.example.service.FileService

class FileServiceImpl : FileService {
}

This file was deleted.

19 changes: 19 additions & 0 deletions v-demo/demo-fs/fs-spring/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server:
port: 3000

spring:
application:
name: fs-spring
profiles:
active: win
servlet:
multipart:
max-file-size: 50MB # 设置单个文件的最大大小。如果上传的文件超过这个大小,将会抛出异常。
max-request-size: 50MB # 设置整个请求的最大大小。这包括所有的文件和其他表单数据。如果整个请求的大小超过这个值,将会抛出异常。
# file-size-threshold: 10MB # 这个属性用于设置写入磁盘的文件的大小阈值。如果上传的文件大小超过这个阈值,那么文件将会被写入到磁盘,而不是保存在内存中。这可以防止大文件上传消耗过多的内存。
# location: C:/tmp/tmp # 这个属性用于设置临时文件的存储位置。当文件大小超过 file-size-threshold 时,文件将会被写入到这个位置。
mvc:
static-path-pattern: /file/**
web:
resources:
static-locations: file:${vitamin.upload-path}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shortlink-nuxt3
# sl-nuxt

# 项目所需的一些命令

Expand All @@ -13,6 +13,12 @@ npm run build
npm run preview
```

# 文档

- [nuxt3](https://nuxt.com/)
- [nuxtui](https://ui.nuxt.com/)
- [tailwind](https://tailwind.nodejs.cn/)

# TODO

- [ ] 响应式
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 04b9c4e

Please sign in to comment.