...
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:
Quick Javascript Tips and Suggestions:
Maintainability, Sustainability
...
- Browser:
fetch()
(built-in) Node.js: node-fetch (like browsers'
fetch()
)
Front-End
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:
...