Fetch VS XHR
| Comparison | Fetch | XHR |
|---|
1 | console.log(0.1 + 0.2) // 0.30000000000000004 |
1 | function strip(number) { |
decimal.js package is 283kb at the time of writing. So decimal.js is not appropriate for frontend.1 | const Decimal = require('decimal.js') |
Authorization header in the format Bearer <token>.OAuth2 blog.Server: Apache2.4 + PHP 7.4.33. Make sure they are installed and connected.
Database: Install Mysql5. Create a database for flarum, e.g. flarum.
Configure PHP:
fileinfo, gd2 and pdo_mysql.Install Composer, which a php package management tool like npm.
Install Flarum:
flarum, cd into it and run composer create-project flarum/flarum ..vendor packages failed to install due to network issues, install behind a proxy:set HTTP_PROXY=http://127.0.0.1:7078composer installConfigure Apache:
1 | DocumentRoot "D:\tmp\flarum\public" |
config.php:'url' => 'http://localhost' change to 'url' => 'http://[domain or ip]'composer require flarum-lang/chinese-simplifiedphp flarum cache:clearContainer
Image
The image contains the container’s filesystem, it must contain everything needed to run an application