npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@opentiny/tiny-toolkit-pro

v1.0.21

Published

TinyPro 开箱即用的中后台前端/设计解决方案

Downloads

184

Readme

tiny-toolkit-pro

说明

tiny-toolkit-pro 套件,开箱即用的全栈开发基础平台

准备工作

数据库准备工作

如果要对接服务端,请提前安装配置本地数据库服务或者云数据库服务,确保连接正常可用,可使用本地数据库或云数据库。

本地数据库: 本地数据库安装MySQL

  • 查看本机操作系统,选择合适的安装包版本下载MySQL
  • 安装完成MySQL软件
  • 进行初始化配置,设置端口、用户、登录密码等,测试连接正常

云数据库: 云数据库推荐使用华为云数据库RDS

  • 注册华为帐号并开通华为云
  • 选择合适的计费模式购买并配置数据库实例
  • 选择合适的连接模式进行连接 具体开通过程请参考:RDS for MySQL快速入门,也可使用TinyCLI云服务插件以命令行的方式开通创建,具体请参考:TinyCLI 云服务插件

Egg.js准备工作

Egg.js 是一个Node.js服务端框架,开发环境准备好Node、Git等即可,参考指南

Spring Cloud准备工作

如选择对接Spring Cloud,需要提前安装好JDK、IDE、Maven、配置好环境变量等

Java环境安装

  1. 下载JDK
  2. 配置环境变量

IDE安装

建议安装使用 IntelliJ IDEA,内置Maven,下载链接

Maven安装

tiny-toolkit-pro 套件中的 Spring Cloud 采用 Maven 构建项目和依赖管理

  1. 下载链接
  2. 环境配置

微服务引擎

有两种方式可供选择:

用法

初始化

tiny init pro

配置项目名称、描述

 ? 请输入项目名称: (tiny-pro)
 ? 请输入项目描述: (基于TinyPro套件创建的中后台系统)

选择前端技术栈

目前支持Vue Angular两种前端技术栈。

 ? 请选择您希望使用的技术栈: (Use arrow keys)
 > vue
   angular

选择服务端技术栈(可选配置)

目前仅 Vue工程支持对接服务端,剩余功能正在开发中。
如果选择不对接服务端,全部接口将采用mock数据。

 ? 请选择您希望使用的服务端技术栈: (Use arrow keys)
 > Egg.js
   Spring Cloud
   暂不配置

选择数据库(可选配置)

 ? 请选择数据库类型: (Use arrow keys)
 > mySQL
   暂不配置

配置数据库信息

初始化过程中会自动创建数据库和表,建议输入新的数据库名称以免造成数据库覆盖风险!

 ? 请输入数据库地址: (localhost)
 ? 请输入数据库端口: (3306)
 ? 请输入数据库名称:
 ? 请输入登录用户名: (root)
 ? 请输入密码: [input is hidden]
  • 此处配置也可在项目创建完成后在server/config/config.default.ts中进行配置修改。
  • pro套件会在初始化时自动创建数据库和表,如因配置等问题导致数据库初始化失败,有以下两种方式可帮助重新初始化数据库:
    • 确认好正确配置后重新运行 tiny init pro 覆盖安装。
    • 进入 server/app/databases 目录下手动执行相关sql。
  • 数据库表中会自动插入一条用户信息(账号:[email protected] 密码:admin),可直接用于登录。
  • 如server服务启动失败,请确保数据库服务的地址、名称、账号、密码等与server/config/config.default.ts 中配置一致。
  • server/app.ts 中会同步ORM模型到数据库帮助新建表但只建议在开发环境下使用。

开启本地服务器

前端

cd web && npm run start

后端

  • EggJS
cd server && npm run dev
  • Spring Cloud
    • 直接使用IDEA一键启动所有服务(推荐)
    • 使用 mvn 命令
    // 进入对应目录下
    mvn spring-boot:run
    • 使用 java -jar 命令
    // 使用IDEA或者mvn进行打包
    mvn clean package
    
    // 进入对应 target 目录下
    java -jar packagename.jar

构建部署

前端:Vue项目采用Vite工具构建,请参考Vite 部署指南Vite 生产环境指南
后端:

维护者

添加官方小助手微信:opentiny-official,加入我们的技术交流群