You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63,7 +63,7 @@ These microservices are preconfigured for security, performance, and graceful re
63
63
64
64
* Webapp server → [web.js](template/web.js)
65
65
* API server → [api.js](template/api.js)
66
-
* Job scheduler → [agenda.js](template/agenda.js)
66
+
* Job scheduler → [bull.js](template/bull.js)
67
67
* Proxy server → [proxy.js](template/proxy.js)
68
68
69
69
### Front-end
@@ -85,11 +85,11 @@ These microservices are preconfigured for security, performance, and graceful re
85
85
86
86
### Back-end
87
87
88
-
* Redis, sessions, and flash messages (both toast and modal messages thanks to [SweetAlert2][])
89
-
* Koa-based webapp and API servers
88
+
* Redis, sessions, and flash toast and modal [SweetAlert2][]messages (uses [ioredis][] which has support for [Cluster][redis-cluster], [Sentinel][redis-sentinel], and more)
89
+
* Koa-based webapp and API servers (uses HTTP/2 for production!)
90
90
* Pagination built-in (using [ctx-paginate][])
91
91
* RESTful API with BasicAuth and versioning
92
-
* Automated job scheduler with cron and human-readable syntax (backed by [Mongoose][] and [Agenda][])
92
+
* Automated job scheduler with cron and human-readable syntax (backed by [Mongoose][] and [Bull][])
93
93
* Passport-based authentication and group-based (Unix-like) permissioning
94
94
* Stripe-inspired error handling
95
95
* Mongoose and MongoDB with common database plugins
@@ -244,31 +244,41 @@ yarn start all
244
244
245
245
##### Debugging
246
246
247
-
As similar to running any other [node][] process, simply use the environment variable `DEBUG`:
247
+
*`DEBUG` - debug using [debug][] output (widely adopted package inthe community for debugging across all Node packages):
248
248
249
-
[npm][]:
249
+
```sh
250
+
DEBUG=* ...
251
+
```
250
252
251
-
```sh
252
-
DEBUG=* npm start
253
-
```
253
+
*`NODE_DEBUG` - debug [node][] internal modules:
254
254
255
-
[yarn][]:
255
+
```sh
256
+
NODE_DEBUG=* ...
257
+
```
256
258
257
-
```sh
258
-
DEBUG=* yarn start all
259
-
```
259
+
*`MONGOOSE_DEBUG` - debug Mongoose raw database operation output:
260
260
261
-
You can also use `NODE_DEBUG`if desired to debug [node][] internal modules.
261
+
```sh
262
+
MONGOOSE_DEBUG=true ...
263
+
```
262
264
263
-
```sh
264
-
NODE_DEBUG=* ...
265
-
```
265
+
*`TRANSPORT_DEBUG` - debug Nodemailer transport:
266
266
267
-
And also `MONGOOSE_DEBUG`if you'd like Mongoose raw database operation output.
267
+
```sh
268
+
TRANSPORT_DEBUG=true ...
269
+
```
268
270
269
-
```sh
270
-
MONGOOSE_DEBUG=true ...
271
-
```
271
+
*`REDIS_MONITOR` - debug Redis using `MONITOR` (uses [@ladjs/redis][ladjs-redis] and passes `true`for the `monitor` argument):
272
+
273
+
```sh
274
+
REDIS_MONITOR=true ...
275
+
```
276
+
277
+
*`REDIS_FRIENDLY_ERROR_STACK` - debug Redis with friendly error stack messages (see [showFriendlyErrorStack][show-friendly-error-stack] option of [ioredis][])
278
+
279
+
```sh
280
+
REDIS_FRIENDLY_ERROR_STACK=true ...
281
+
```
272
282
273
283
#### Production
274
284
@@ -506,39 +516,53 @@ tree template -I "build|node_modules|coverage|test"
506
516
template
507
517
├── LICENSE
508
518
├── README
509
-
├── agenda.js
510
519
├── api.js
511
520
├── app
512
521
│ ├── controllers
513
522
│ │ ├── api
514
523
│ │ │ ├── index.js
515
524
│ │ │ └── v1
516
525
│ │ │ ├── index.js
526
+
│ │ │ ├── log.js
517
527
│ │ │ └── users.js
518
528
│ │ ├── index.js
519
529
│ │ └── web
530
+
│ │ ├── admin
531
+
│ │ │ ├── index.js
532
+
│ │ │ └── users.js
520
533
│ │ ├── auth.js
521
-
│ │ ├── contact.js
522
-
│ │ └── index.js
534
+
│ │ ├── index.js
535
+
│ │ ├── my-account.js
536
+
│ │ └── support.js
523
537
│ ├── models
524
538
│ │ ├── index.js
525
539
│ │ ├── inquiry.js
526
540
│ │ └── user.js
527
541
│ └── views
528
542
│ ├── 404.pug
529
543
│ ├── 500.pug
544
+
│ ├── _breadcrumbs.pug
530
545
│ ├── _footer.pug
531
546
│ ├── _nav.pug
532
547
│ ├── _pagination.pug
548
+
│ ├── _register-or-login.pug
533
549
│ ├── about.pug
534
-
│ ├── admin.pug
535
-
│ ├── contact.pug
550
+
│ ├── admin
551
+
│ │ ├── index.pug
552
+
│ │ └── users
553
+
│ │ ├── index.pug
554
+
│ │ └── retrieve.pug
555
+
│ ├── dashboard
556
+
│ │ └── index.pug
536
557
│ ├── forgot-password.pug
537
558
│ ├── home.pug
538
559
│ ├── layout.pug
539
-
│ ├── my-account.pug
560
+
│ ├── my-account
561
+
│ │ ├── index.pug
562
+
│ │ └── security.pug
563
+
│ ├── privacy.pug
564
+
│ ├── register-or-login.pug
540
565
│ ├── reset-password.pug
541
-
│ ├── signup-or-login.pug
542
566
│ ├── spinner
543
567
│ │ ├── 1.pug
544
568
│ │ ├── 10.pug
@@ -552,58 +576,47 @@ template
552
576
│ │ ├── 8.pug
553
577
│ │ ├── 9.pug
554
578
│ │ └── spinner.pug
579
+
│ ├── support.pug
555
580
│ └── terms.pug
556
581
├── assets
557
582
│ ├── browserconfig.xml
558
583
│ ├── css
559
584
│ │ ├── _custom.scss
560
585
│ │ ├── _email.scss
561
-
│ │ ├── _hljs-github.scss
586
+
│ │ ├── _hljs.scss
587
+
│ │ ├── _sticky-footer.scss
562
588
│ │ ├── _variables.scss
563
589
│ │ └── app.scss
564
590
│ ├── fonts
565
-
│ │ └── GoudyBookletter1911.otf
566
591
│ ├── img
567
592
│ │ ├── android-chrome-192x192.png
568
593
│ │ ├── android-chrome-384x384.png
569
594
│ │ ├── apple-touch-icon.png
570
595
│ │ ├── favicon-16x16.png
571
596
│ │ ├── favicon-32x32.png
572
597
│ │ ├── favicon.ico
598
+
│ │ ├── logo-square.svg
573
599
│ │ ├── mstile-150x150.png
574
-
│ │ └── social.png
600
+
│ │ ├── social.png
601
+
│ │ └── twitter.png
575
602
│ ├── js
576
-
│ │ ├── admin
577
-
│ │ │ └── dashboard.js
578
-
│ │ ├── ajax-form.js
579
-
│ │ ├── change-hash-on-scroll.js
580
-
│ │ ├── clipboard.js
581
603
│ │ ├── core.js
582
-
│ │ ├── custom-file-input.js
583
-
│ │ ├── facebook-hash-fix.js
584
-
│ │ ├── flash.js
585
-
│ │ ├── jump-to.js
586
-
│ │ ├── return-to.js
587
-
│ │ ├── spinner.js
588
-
│ │ └── swal.js
589
-
│ └── manifest.json
604
+
│ │ ├── logger.js
605
+
│ │ └── uncaught.js
606
+
│ ├── manifest.json
607
+
│ └── robots.txt
608
+
├── bull.js
590
609
├── config
591
610
│ ├── env.js
592
-
│ ├── environments
593
-
│ │ ├── development.js
594
-
│ │ ├── index.js
595
-
│ │ ├── production.js
596
-
│ │ ├── staging.js
597
-
│ │ └── test.js
598
611
│ ├── index.js
599
612
│ ├── meta.js
600
613
│ ├── phrases.js
614
+
│ ├── polyfills.js
601
615
│ └── utilities.js
602
616
├── ecosystem.json
603
617
├── emails
604
618
│ ├── _content.pug
605
619
│ ├── _footer.pug
606
-
│ ├── _header.pug
607
620
│ ├── _nav.pug
608
621
│ ├── inquiry
609
622
│ │ ├── html.pug
@@ -622,18 +635,21 @@ template
622
635
│ ├── i18n.js
623
636
│ ├── index.js
624
637
│ ├── logger.js
638
+
│ ├── passport.js
625
639
│ └── policies.js
626
-
├── jobs
627
-
│ ├── email.js
628
-
│ └── index.js
640
+
├── index.js
629
641
├── locales
630
-
│ ├── README.md
631
642
│ ├── en.json
632
643
│ ├── es.json
633
644
│ └── zh.json
634
645
├── nodemon.json
646
+
├── package-scripts.js
635
647
├── package.json
636
648
├── proxy.js
649
+
├── queues
650
+
│ ├── email.js
651
+
│ ├── index.js
652
+
│ └── mandarin.js
637
653
├── routes
638
654
│ ├── api
639
655
│ │ ├── index.js
@@ -643,9 +659,13 @@ template
643
659
│ └── web
644
660
│ ├── admin.js
645
661
│ ├── auth.js
646
-
│ └── index.js
662
+
│ ├── index.js
663
+
│ └── my-account.js
664
+
├── template
647
665
├── web.js
648
666
└── yarn.lock
667
+
668
+
31 directories, 119 files
649
669
```
650
670
651
671
@@ -745,7 +765,7 @@ If you are seeking permission to use these trademarks, then please [contact us](
745
765
746
766
[git]: https://git-scm.com/
747
767
748
-
[slack]: http://slack.crocodilejs.com/
768
+
[slack]: https://slack.crocodilejs.com/
749
769
750
770
[brew]: https://brew.sh/
751
771
@@ -805,7 +825,7 @@ If you are seeking permission to use these trademarks, then please [contact us](
805
825
806
826
[mongoose]: http://mongoosejs.com
807
827
808
-
[agenda]: http://agendajs.com
828
+
[bull]: https://github.com/OptimalBits/bull
809
829
810
830
[ladjs-auth]: https://github.com/ladjs/auth
811
831
@@ -866,3 +886,15 @@ If you are seeking permission to use these trademarks, then please [contact us](
0 commit comments