atomino / project
atomino项目样板
1.0.0
2022-03-30 16:38 UTC
Requires
- ext-curl: *
- ext-gd: *
- ext-json: *
- ext-readline: *
- ext-sockets: *
- atomino/bundle-attachment: dev-master
- atomino/bundle-authenticate: dev-master
- atomino/bundle-authorize: dev-master
- atomino/bundle-comment: dev-master
- atomino/bundle-created: dev-master
- atomino/bundle-debug: dev-master
- atomino/bundle-guid: dev-master
- atomino/bundle-typed-field: dev-master
- atomino/bundle-updated: dev-master
- atomino/carbon: dev-master
- atomino/core: dev-master
- atomino/gold: dev-master
- atomino/mercury: dev-master
This package is auto-updated.
Last update: 2024-09-12 14:24:50 UTC
README
要求
- php 8.0;
- ext-gd
- ext-curl
- ext-mbstring
- php-mysql
- mysql 8.0
- composer 2
可选
- node 15.14.0
- npm 7.7.6
- apache 2.4
创建项目
composer create-project atomino/project your-project -s dev
- 在安装程序中配置您的项目
- 为您的项目创建一个
mysql
数据库(utf-8) bin/mkvardir.sh
- 创建var
目录结构- 授予web服务器写入整个
var
目录的权限 bin/atomino mig:init
- 初始化迁移bin/atomino mig:migrate
- 执行第一个迁移(用户)bin/publish.sh
- 将所有文件从etc/public
复制到var/public
文件夹
前端
此项目使用svelte作为前端框架。前端项目位于frontend
文件夹中。这些是独立的项目 - 每个项目都有自己的根文件夹 - 嵌入到您的应用程序中。
- 您应该安装依赖项
cd frontend/admin
npm install
- 构建您的代码
npm run dev
- 开发构建,带有监视,直接编译到var/public
文件夹- 或
npm run build
- 生产构建,它编译到etc/public
文件夹- 要使其生效,您需要将其发布到
var/public
- 要使其生效,您需要将其发布到
字体
(npm required)
有一个内置解决方案来处理fontawesome
和所有@fontsource
字体。
cd frontend/admin
(或任何其他前端目录)npm run fonts
- 这将所有@fontsource
和fontawesome
(pro/free)从node_moduels
复制到etc/public
bin/publish.sh
使用内置服务器运行和测试
- 运行记录服务器:
bin/log.sh
- 运行开发服务器:
bin/dev.sh
- 在浏览器中打开网站:
http://my-project.localhost:8080
- 您应该看到一个atom
- 在浏览器中打开gold admin:
http://admin.my-project.localhost:8080
- 用户:
atomino@atomino.atom
- 密码:
atomino
- 用户:
- 在浏览器中测试api:
http://api.my-project.localhost:8080/user/1
- 您应该看到一个json
- 尝试使用Chrome Json Formatter扩展
设置apache
- 运行
bin/vhost
- 它将
etc/vhost
文件夹复制到var/vhost
- 并更新
vhost.conf
文件中的root
和domain
变量,基于atomino.ini
- 它将
- 将
var/vhost/vhost.conf
包含到您的httpd.conf
或apache2.conf
文件中 - 重新加载/重启apache
- 在您的浏览器中打开
http://my-project.localhost
- 有一个内置的https解决方案,但您也可以按自己的喜好设置vhost。