在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tomatau/breko-hub开源软件地址:https://github.com/tomatau/breko-hub开源编程语言:JavaScript 95.6%开源软件介绍:Babel React Koa - Hot Universal Boilerplate Breko HubBreko hub is a github repository that helps anyone create new JavaScript applications. Giving you a technically sound and well tested starting point for your application. Why?Create-React-App, Razzle, NextJS, etc... are fantastic alternatives! The reason for Breko-hub is that it comes with some extras:
Why not?
Documentationhttps://tomatao.gitbooks.io/breko-hub/content/ (outdated) Features
PrerequsitsBreko-hub will only work on node version 6 and above as it is making use of Koa v2 along with polyfills for async/await syntax. To make it work on a lower version of node, the runtime compilation would need to be applied to koa and other node_modules. Quick StartUse the following commands to get started on your new app using breko-hub. git clone --depth=1 [email protected]:tomatau/breko-hub.git <directory-name>
cd <directory-name>
rm -rf .git
git init
npm i
mv example.env .env
npm start With the default Open a browser window at You'll see example routes that demonstrate API calls and flash messages after redirects. You can remove the example code for a cleaner starting point by running: npm run remove-examples This is a one time operation that can't be undone, it's also advised to run this before you start making any changes as it will hard replace some BlogThere is also a new blog that documents some of the techniques used in breko-hub. The blog was also created using breko-hub as a starting point. LibrariesBreko hub uses the following libraries at its core: Build tools
Server
Universal Application
Utility
Styling
CommandsDeveloping npm run start [-- --open] Builds and serves app with hot reloading and debugging support. Build client-side app Change your NODE_ENV to "production", you can do this is npm run build Creates bundles and assets into Start the server in production Set the NODE_ENV flag to production in your npm start Expects bundles and assets to exist in the Unit test single run
Runs the test suite in a node environment through mocha, once. integration tests run
Runs integration tests inside Lint
Reads Coverage
Reads Unit test development server (BROKEN) npm run test:server Start a test server using Mocha and Webpack-middleware. Provides a browser based testing environment. Loading tests from within ConfigurationChange anything you want! It's all exposed and for you! <3 DockerThere's a starting docker images you can use to get going. You'll probably wanr to modify the Dockerfile to your needs. # production image built with assets
$ docker build --compress -t your-username/your-app-name .
# runs `npm start` with port at 9001
$ docker run -p 9001:9001 your-username/your-app-name |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论