UNPKG
datoit-generate-plugin
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
Generate an plugin for a Datoit application.
datoit.com
datoit/datoit
datoit-generate-plugin
/
json
/
routes.json.js
25 lines
(21 loc)
•
376 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict'
;
/** * Expose main routes of the generated plugin */
module
.
exports
=
scope
=>
{
function
generateRoutes
(
) {
return
{
routes
: [ {
method
:
'GET'
,
path
:
'/'
,
handler
: scope.
name
+
'.index'
,
config
: {
policies
: [], }, }, ], }; }
return
generateRoutes
(); };