Name: webtask-everywhere
Owner: Auth0
Description: Sample project for creating an Express-based server that runs on webtask.io or as a node server.
Created: 2016-01-12 04:17:29.0
Updated: 2018-03-31 22:42:59.0
Pushed: 2016-04-21 22:16:31.0
Homepage: null
Size: 4
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Sample project for creating an Express-based server that runs on webtask.io or as a node server with the same codebase.
In the project root, there are two files: 1) server.js
; and 2) webtask.js
.
These files are the entry-points into the node and webtask versions of the code in lib/
, respectively.
There is no magic for making this work as a node server.
To make the same code-base work as a webtask, webpack is used to bundle the code intelligently. This means modules that are natively available on the Webtask platform will not be bundled, however modules that are not available will.
npm run start
- Start the project as a typical express server.
npm run build
- Will generate a development build of the webtask's code so that you can inspect it. Webpack is pre-configured to support a wide variety of things.
npm run deploy-webtask
- First creates a production build of your webtask code and then uses the wt-cli
command to create a webtask (note: requires wt-cli
).
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.