express-sweet-generator 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -1
- package/README.md +16 -43
- package/bin/express-sweet-cli.js +220 -214
- package/package.json +1 -1
- package/templates/{.env → cjs/.env} +0 -0
- package/templates/{app.js → cjs/app.js} +0 -0
- package/templates/{bin → cjs/bin}/www.ejs +0 -0
- package/templates/{config → cjs/config}/authentication.js +1 -1
- package/templates/{config → cjs/config}/config.js +0 -0
- package/templates/{config → cjs/config}/database.js +6 -12
- package/templates/{config → cjs/config}/view.js +0 -0
- package/templates/{ecosystem.config.js.ejs → cjs/ecosystem.config.js.ejs} +5 -1
- package/templates/{models → cjs/models}/BookModel.js +0 -0
- package/templates/{models → cjs/models}/CommentModel.js +0 -0
- package/templates/{models → cjs/models}/ProfileModel.js +0 -0
- package/templates/{models → cjs/models}/UserModel.js +0 -0
- package/templates/{nginx.sample.conf.ejs → cjs/nginx.sample.conf.ejs} +0 -0
- package/templates/{package.json.ejs → cjs/package.json.ejs} +2 -7
- package/templates/{views/partials/.gitkeep → cjs/public/assets/home.css} +0 -0
- package/templates/cjs/public/assets/home.js +0 -0
- package/templates/{public/assets/styles → cjs/public/assets}/login.css +0 -2
- package/templates/{public/assets/scripts → cjs/public/assets}/login.js +0 -3
- package/templates/{public/assets/images → cjs/public/assets}/logo.svg +0 -0
- package/templates/cjs/public/assets/user.css +0 -0
- package/templates/{public/assets/scripts → cjs/public/assets}/user.js +0 -3
- package/templates/cjs/public/assets/users.css +0 -0
- package/templates/{public/assets/scripts → cjs/public/assets}/users.js +11 -9
- package/templates/{public → cjs/public}/favicon.ico +0 -0
- package/templates/{public → cjs/public}/rekognition-test-image/add-face-to-collection.jpg +0 -0
- package/templates/{public → cjs/public}/rekognition-test-image/compare-faces-source.jpg +0 -0
- package/templates/{public → cjs/public}/rekognition-test-image/compare-faces-target.jpg +0 -0
- package/templates/{public → cjs/public}/rekognition-test-image/detect-faces.jpg +0 -0
- package/templates/{routes → cjs/routes}/api/users.js +7 -33
- package/templates/{routes → cjs/routes}/home.js +0 -3
- package/templates/{routes → cjs/routes}/login.js +0 -3
- package/templates/{routes → cjs/routes}/users.js +3 -9
- package/templates/{views → cjs/views}/error.hbs +1 -2
- package/templates/cjs/views/home.hbs +5 -0
- package/templates/{views → cjs/views}/layout/default.hbs +13 -18
- package/templates/cjs/views/login.hbs +16 -0
- package/templates/cjs/views/partials/.gitkeep +0 -0
- package/templates/cjs/views/user.hbs +35 -0
- package/templates/cjs/views/users.hbs +18 -0
- package/templates/esm/.env +1 -0
- package/templates/esm/app.js +10 -0
- package/templates/esm/bin/www.ejs +67 -0
- package/templates/esm/config/authentication.js +81 -0
- package/templates/esm/config/config.js +78 -0
- package/templates/esm/config/database.js +35 -0
- package/templates/esm/config/view.js +36 -0
- package/templates/esm/ecosystem.config.js.ejs +35 -0
- package/templates/esm/models/BookModel.js +30 -0
- package/templates/esm/models/CommentModel.js +30 -0
- package/templates/esm/models/ProfileModel.js +49 -0
- package/templates/esm/models/UserModel.js +113 -0
- package/templates/esm/nginx.sample.conf.ejs +48 -0
- package/templates/esm/package.json.ejs +21 -0
- package/templates/esm/public/assets/home.css +0 -0
- package/templates/esm/public/assets/home.js +0 -0
- package/templates/esm/public/assets/login.css +16 -0
- package/templates/esm/public/assets/login.js +29 -0
- package/templates/{public/assets/images/logo-dark.svg → esm/public/assets/logo.svg} +2 -2
- package/templates/esm/public/assets/user.css +0 -0
- package/templates/esm/public/assets/user.js +50 -0
- package/templates/esm/public/assets/users.css +0 -0
- package/templates/esm/public/assets/users.js +85 -0
- package/templates/esm/public/favicon.ico +0 -0
- package/templates/esm/public/rekognition-test-image/add-face-to-collection.jpg +0 -0
- package/templates/esm/public/rekognition-test-image/compare-faces-source.jpg +0 -0
- package/templates/esm/public/rekognition-test-image/compare-faces-target.jpg +0 -0
- package/templates/esm/public/rekognition-test-image/detect-faces.jpg +0 -0
- package/templates/esm/routes/api/users.js +98 -0
- package/templates/esm/routes/home.js +8 -0
- package/templates/esm/routes/login.js +8 -0
- package/templates/esm/routes/users.js +31 -0
- package/templates/esm/views/error.hbs +4 -0
- package/templates/esm/views/home.hbs +5 -0
- package/templates/esm/views/layout/default.hbs +57 -0
- package/templates/esm/views/login.hbs +16 -0
- package/templates/esm/views/partials/.gitkeep +0 -0
- package/templates/esm/views/user.hbs +35 -0
- package/templates/esm/views/users.hbs +18 -0
- package/templates/public/assets/scripts/docs.js +0 -1
- package/templates/public/assets/scripts/home.js +0 -3
- package/templates/public/assets/styles/docs.css +0 -2200
- package/templates/public/assets/styles/home.css +0 -1
- package/templates/public/assets/styles/user.css +0 -1
- package/templates/public/assets/styles/users.css +0 -1
- package/templates/views/home.hbs +0 -11
- package/templates/views/login.hbs +0 -27
- package/templates/views/user.hbs +0 -42
- package/templates/views/users.hbs +0 -30
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*Home page CSS*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*User add/edit page CSS*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*User list page CSS*/
|
package/templates/views/home.hbs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{{!< default}}
|
|
2
|
-
{{#contentFor 'title'}}Home{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="{{cache_busting '/assets/styles/home.css' baseUrl}}">
|
|
5
|
-
<!-- <link rel="stylesheet" type="text/css" href="{{baseUrl}}/assets/styles/home.css"> -->
|
|
6
|
-
{{/contentFor}}
|
|
7
|
-
{{#contentFor 'script'}}
|
|
8
|
-
<script src="{{cache_busting '/assets/scripts/home.js' baseUrl}}"></script>
|
|
9
|
-
<!-- <script src="{{baseUrl}}/assets/scripts/home.js"></script> -->
|
|
10
|
-
{{/contentFor}}
|
|
11
|
-
<h1 class="mt-5 text-center">Welcome to Express Sweet</h1>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{{!< default}}
|
|
2
|
-
{{#contentFor 'title'}}Login{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="{{cache_busting '/assets/styles/login.css' baseUrl}}">
|
|
5
|
-
<!-- <link rel="stylesheet" type="text/css" href="{{baseUrl}}/assets/styles/login.css"> -->
|
|
6
|
-
{{/contentFor}}
|
|
7
|
-
{{#contentFor 'script'}}
|
|
8
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/jquery.validate.min.js" integrity="sha512-UdIMMlVx0HEynClOIFSyOrPggomfhBKJE28LKl8yR3ghkgugPnG6iLfRfHwushZl1MOPSY6TsuBDGPK2X4zYKg==" crossorigin="anonymous"></script>
|
|
9
|
-
<script src="{{cache_busting '/assets/scripts/login.js' baseUrl}}"></script>
|
|
10
|
-
<!-- <script src="{{baseUrl}}/assets/scripts/login.js"></script> -->
|
|
11
|
-
{{/contentFor}}
|
|
12
|
-
<form id="form" class="w-100 mx-auto my-0 login-form needs-validation">
|
|
13
|
-
<!-- <form method="post" action="/api/users/login" class="w-100 mx-auto my-0 login-form needs-validation"> -->
|
|
14
|
-
<div class="text-center">
|
|
15
|
-
<img class="mb-4" src="{{baseUrl}}/assets/images/logo.svg" height="100">
|
|
16
|
-
</div>
|
|
17
|
-
<h1 class="h3 mb-3 font-weight-normal text-center">Please login</h1>
|
|
18
|
-
<div class="mb-3">
|
|
19
|
-
<label class="form-label">Email address</label>
|
|
20
|
-
<input type="email" class="form-control" name="email" required autofocus value="robin@example.com" placeholder="name@example.com">
|
|
21
|
-
</div>
|
|
22
|
-
<div class="mb-3">
|
|
23
|
-
<label class="form-label">Password</label>
|
|
24
|
-
<input type="password" class="form-control" name="password" required value="password">
|
|
25
|
-
</div>
|
|
26
|
-
<button class="btn btn-primary d-block w-100" type="submit">Login</button>
|
|
27
|
-
</form>
|
package/templates/views/user.hbs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{{!< default}}
|
|
2
|
-
{{#contentFor 'title'}}Dashboard{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="{{cache_busting '/assets/styles/user.css' baseUrl}}">
|
|
5
|
-
<!-- <link rel="stylesheet" type="text/css" href="{{baseUrl}}/assets/styles/user.css"> -->
|
|
6
|
-
{{/contentFor}}
|
|
7
|
-
{{#contentFor 'script'}}
|
|
8
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/jquery.validate.min.js" integrity="sha512-UdIMMlVx0HEynClOIFSyOrPggomfhBKJE28LKl8yR3ghkgugPnG6iLfRfHwushZl1MOPSY6TsuBDGPK2X4zYKg==" crossorigin="anonymous"></script>
|
|
9
|
-
<script src="{{cache_busting '/assets/scripts/user.js' baseUrl}}"></script>
|
|
10
|
-
<!-- <script src="{{baseUrl}}/assets/scripts/user.js"></script> -->
|
|
11
|
-
{{/contentFor}}
|
|
12
|
-
<div class="row justify-content-center">
|
|
13
|
-
<div class="col-12 col-md-7">
|
|
14
|
-
<h3 class="font-weight-bold text-dark">
|
|
15
|
-
{{ifx edit 'Edit user:' 'New user:'}}
|
|
16
|
-
</h3>
|
|
17
|
-
<form id="form">
|
|
18
|
-
<div class="mb-3">
|
|
19
|
-
<label class="form-label">Email address</label>
|
|
20
|
-
<input type="email" class="form-control" name="email" value="{{user.email}}" required autofocus placeholder="name@example.com">
|
|
21
|
-
</div>
|
|
22
|
-
<div class="mb-3">
|
|
23
|
-
<label class="form-label">Name</label>
|
|
24
|
-
<input type="text" class="form-control" name="name" value="{{user.name}}" required>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="mb-3">
|
|
27
|
-
<label class="form-label">Password</label>
|
|
28
|
-
<input type="password" class="form-control" name="password" aria-describedby="passwordHelp" {{#unless edit}}required{{/unless}}>
|
|
29
|
-
{{#if edit}}
|
|
30
|
-
<div id="passwordHelp" class="form-text">Enter only if you want to change the password.</div>
|
|
31
|
-
{{/if}}
|
|
32
|
-
</div>
|
|
33
|
-
<div class="d-flex justify-content-between mt-3">
|
|
34
|
-
<a href="{{baseUrl}}/users" class="btn btn-secondary">Return to user list</a>
|
|
35
|
-
<button type="submit" class="btn btn-primary">Save user data</button>
|
|
36
|
-
</div>
|
|
37
|
-
</form>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
{{#if edit}}<input type="hidden" id="id" value="{{user.id}}">{{/if}}
|
|
42
|
-
<input type="hidden" id="edit" value="{{ifx edit 1 0}}">
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{{!< default}}
|
|
2
|
-
{{#contentFor 'title'}}Dashboard{{/contentFor}}
|
|
3
|
-
{{#contentFor 'style'}}
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/dataTables.bootstrap5.min.css">
|
|
5
|
-
<link rel="stylesheet" type="text/css" href="{{cache_busting '/assets/styles/users.css' baseUrl}}">
|
|
6
|
-
<!-- <link rel="stylesheet" type="text/css" href="{{baseUrl}}/assets/styles/users.css"> -->
|
|
7
|
-
{{/contentFor}}
|
|
8
|
-
{{#contentFor 'script'}}
|
|
9
|
-
<script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
|
|
10
|
-
<script src="https://cdn.datatables.net/1.10.24/js/dataTables.bootstrap5.min.js"></script>
|
|
11
|
-
<script src="{{cache_busting '/assets/scripts/users.js' baseUrl}}"></script>
|
|
12
|
-
<!-- <script src="{{baseUrl}}/assets/scripts/users.js"></script> -->
|
|
13
|
-
{{/contentFor}}
|
|
14
|
-
|
|
15
|
-
<div class="d-flex mb-4">
|
|
16
|
-
<h3 class="font-weight-bold text-dark">User list:</h3>
|
|
17
|
-
<a href="/users/new" class="btn btn-primary" style="margin-left: auto;">Add New</a>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<table class="table w-100" id="table">
|
|
21
|
-
<thead>
|
|
22
|
-
<tr>
|
|
23
|
-
<th scope="col">ID</th>
|
|
24
|
-
<th scope="col">Email</th>
|
|
25
|
-
<th scope="col">Name</th>
|
|
26
|
-
<th scope="col">Modified</th>
|
|
27
|
-
<th scope="col">#</th>
|
|
28
|
-
</tr>
|
|
29
|
-
</thead>
|
|
30
|
-
</table>
|