GithubHelp home page GithubHelp logo

puxt-vx's Introduction

puxt-vx

setup

index.php

require_once __DIR__ . "/vendor/autoload.php";

//
header("Access-Control-Allow-Origin: http://localhost:3000");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers: Content-Type, Authorization");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, HEAD, DELETE");
header("Access-Control-Expose-Headers: location, Content-Location");


$app = new PUXT\App();
$app->pipe(VX::class);
$app->run();

.env

JWT_SECRET=123456

DATABASE_HOSTNAME=
DATABASE_DATABASE=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_PORT=3306
DATABASE_CHARSET=utf8mb4

.htaccess

RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

File Manager

Support local, s3, hostlink-storage to store files.

local

VX_FILE_MANAGER_0=local
VX_FILE_MANAGER_0_PATH=/var/www/html/uploads

s3

composer require league/flysystem-aws-s3-v3:^3.0
composer require aws/aws-sdk-php
VX_FILE_MANAGER_0=s3
VX_FILE_MANAGER_0_KEY=your-key
VX_FILE_MANAGER_0_SECRET=your-secret
VX_FILE_MANAGER_0_REGION=your-region
VX_FILE_MANAGER_0_BUCKET=your-bucket
VX_FILE_MANAGER_0_PREFIX=your-prefix
VX_FILE_MANAGER_0_ENDPOINT=your-endpoint

hostlink-storage

composer require hostlink/hostlink-storage-adapter
VX_FILE_MANAGER_0=hostlink-storage
VX_FILE_MANAGER_0_TOKEN=your-token
VX_FILE_MANAGER_0_ENDPOINT=your-endpoint

multiple file manager

For multiple file manager, use VX_FILE_MANAGER_1, VX_FILE_MANAGER_2, etc.

$fs=$vx->getFileSystem(1); // use file manager 1

Debug mode

To enable debug mode, set VX_DEBUG=1 in .env file.

VX_DEBUG=1

Language

To enable language, set VX_LANGUAGE_0_NAME and VX_LANGUAGE_0_LOCALE in .env file.

VX_LANGUAGE_0_NAME=English
VX_LANGUAGE_0_LOCALE=en

VX_LANGUAGE_1_NAME=中文
VX_LANGUAGE_1_LOCALE=zh-hk

puxt-vx's People

Contributors

mathsgod avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.