...
To help get you started, we've included some example basic Node.JS script examples that you can use as a basis to quickly get started with the Server CLI.
There are examples of using both the automatic routing option (directory based), and manual route configuration (configuration based) options, as described in Creating Your Project Structure.
Github
There are examples in the Github repo, and you can find them in the "examples" folder:
https://github.com/blinkmobile/server-cli/tree/master/examples/directoryHere you'll find a basic "helloworld" script, plus a promise based script that simulates a longer server script execution time.
Download ZIP
If you prefer, you can download the examples here, directly:
Server CLI Node Code Examples.zip
Quick Javascript Tips and Suggestions:
...
- Browser:
fetch()
(built-in) Node.js: node-fetch (like browsers'
fetch()
)
...
When writing your front-end Javascript for your app:
- Use hash-based routing in Cordova / webview apps, and consider using hash-based routing for web apps, too
External Resources:
...