1 | # qewd: Quick and Easy Web Developer
|
2 |
|
3 | Rob Tweed <rtweed@mgateway.com>
|
4 | 24 February 2016, M/Gateway Developments Ltd [http://www.mgateway.com](http://www.mgateway.com)
|
5 |
|
6 | Twitter: @rtweed
|
7 |
|
8 | Google Group for discussions, support, advice etc: [http://groups.google.co.uk/group/enterprise-web-developer-community](http://groups.google.co.uk/group/enterprise-web-developer-community)
|
9 |
|
10 | Thanks to Ward De Backer for debugging assistance and functionality suggestions
|
11 |
|
12 | ## What is QEWD?
|
13 |
|
14 | In summary: [QEWD](http://qewdjs.com) is a Node.js-based platform for developing and running both interactive WebSocket-based applications and REST APIs. QEWD can run as either a monolithic back-end or as a set of MicroServices.
|
15 |
|
16 | QEWD uses a [unique architecture](https://medium.com/the-node-js-collection/having-your-node-js-cake-and-eating-it-too-799e90d40186)
|
17 | that prevents CPU-intensive or long-running APIs bringing a Node.js system to its knees,
|
18 | and includes [QEWD-JSdb](https://github.com/robtweed/qewd-jsdb), a powerful high-performance,
|
19 | tightly-integrated multi-model database which, uniquely, presents your data as persistent JavaScript Objects.
|
20 |
|
21 |
|
22 | ## Try it out
|
23 |
|
24 | The quickest way to try out QEWD is using the pre-built Docker version.
|
25 |
|
26 | docker pull rtweed/qewd-server
|
27 |
|
28 | There's also a Raspberry Pi version
|
29 |
|
30 | docker pull rtweed/qewd-server-rpi
|
31 |
|
32 | Create three files within a folder of your choice (eg *~/myQEWDApp*), using the sub-folder structure shown below:
|
33 |
|
34 | ~/myQEWDApp
|
35 | |
|
36 | |_ configuration
|
37 | | |
|
38 | | |_ config.json
|
39 | | |
|
40 | | |_ routes.json
|
41 | |
|
42 | |_ apis
|
43 | | |
|
44 | | |_ helloworld
|
45 | | |
|
46 | | |_ index.js
|
47 |
|
48 |
|
49 | ### *config.json*
|
50 |
|
51 | {
|
52 | "qewd_up": true
|
53 | }
|
54 |
|
55 |
|
56 | ### *routes.json*
|
57 |
|
58 | [
|
59 | {
|
60 | "uri": "/api/helloworld",
|
61 | "method": "GET",
|
62 | "handler": "helloworld"
|
63 | }
|
64 | ]
|
65 |
|
66 |
|
67 | ### *index.js*
|
68 |
|
69 | module.exports = function(args, finished) {
|
70 | finished({
|
71 | hello: 'world'
|
72 | });
|
73 | };
|
74 |
|
75 |
|
76 | Fire up the QEWD Docker instance:
|
77 |
|
78 | docker run -it --name qewdup --rm -p 3000:8080 -v ~/myQEWDApp:/opt/qewd/mapped rtweed/qewd-server
|
79 |
|
80 | or on a Raspberry Pi:
|
81 |
|
82 | docker run -it --name qewdup --rm -p 3000:8080 -v ~/myQEWDApp:/opt/qewd/mapped rtweed/qewd-server-rpi
|
83 |
|
84 |
|
85 | Try out your REST API:
|
86 |
|
87 | http://{{host-ip-address}}:3000/api/helloworld
|
88 |
|
89 | *eg*:
|
90 |
|
91 | http://192.168.1.100:3000/api/helloworld
|
92 |
|
93 |
|
94 | ## Further Reading
|
95 |
|
96 | [Baseline QEWD Environment](https://github.com/robtweed/qewd-baseline), with Tutorials on devloping
|
97 | [REST APIs](https://github.com/robtweed/qewd-baseline/blob/master/REST.md) and
|
98 | [Interactive WebSocket-based Applications](https://github.com/robtweed/qewd-baseline/blob/master/INTERACTIVE.md).
|
99 |
|
100 | [Getting Started with QEWD using QEWD-Up](https://github.com/robtweed/qewd/tree/master/up)
|
101 |
|
102 | [Information on QEWD-JSdb](https://github.com/robtweed/qewd-jsdb),
|
103 | the multi-model database that is integrated with QEWD. This is a unique,
|
104 | ground-breaking database abstraction which provides you with on-disk, persistent JavaScript Objects
|
105 | with which you directly interact via JavaScript.
|
106 |
|
107 |
|
108 |
|
109 | ## License
|
110 |
|
111 | Copyright (c) 2016-19 M/Gateway Developments Ltd,
|
112 | Redhill, Surrey UK.
|
113 | All rights reserved.
|
114 |
|
115 | http://www.mgateway.com
|
116 | Email: rtweed@mgateway.com
|
117 |
|
118 |
|
119 | Licensed under the Apache License, Version 2.0 (the "License");
|
120 | you may not use this file except in compliance with the License.
|
121 | You may obtain a copy of the License at
|
122 |
|
123 | http://www.apache.org/licenses/LICENSE-2.0
|
124 |
|
125 | Unless required by applicable law or agreed to in writing, software
|
126 | distributed under the License is distributed on an "AS IS" BASIS,
|
127 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
128 | See the License for the specific language governing permissions and
|
129 | limitations under the License.
|