Multiple template engines with KeystoneJS - keystonejs

I have read all of the forums and docs I can find, but cannot find a good answer. I would like to use Jade AND EJS as template engines in KeytoneJs/Express. It seems like it is possible with express, can I do it with keystone? Any examples would be helpful.

Do you have a specific use case for this? (Is there something EJS can't do that Jade can, and/or vice versa)? These two posts below might help you.
how to use both ejs and jade in one nodejs & express project?
Is there any way to use multiple view engines with Express + Node.js

Related

How to use microfrontends with Vue/Nuxt?

I wanted to know how to use Microfrontends with Nuxt or at least Vue.
Is there a plug & play simple solution to have it working quickly?
I've heard about Webpack's v5 ModuleFederationPlugin for example, is this a valid thing to start my Nuxt project?
As of today, Nuxt2 is still using Webpack4 so ModuleFederationPlugin will not be a possible solution.
Nuxt v3 will come with Webpack's v5 support and you'll probably be able to try it then. I also heard that the same could be used with Vite btw.
As a general answer, you need to understand that a Microfrontend is not something simple to do. It is more about how you do structure your app in the larger scope.
It's like having a micro-service on the backend: it can be done is multiple ways and it all depends of the needs of the company/team.
If you do create a Vue2 or Vue3 project with the Vue CLI, you'll still have Webpack v4. You can probably try to make the upgrade yourself if planning to use ModuleFederationPlugin.
As an alternative, there is single-spa. This is a way of doing it (probably not the only one).
Here is a podcast show talking about the subject in depth: https://devchat.tv/views-on-vue/building-micro-frontends-with-lawrence-almeida-vue-160/
It may be relevant to understand the general way this is working and also the pro/cons.
If you're not satisfied with this approach, there are a lot of articles on the Web talking about Microfrontends and some Google-fu will be enough to give you an alternative way.

VUEJS SSR, how to?

I made a VueJS 3 app (WebPack 3.12.0), with prerendering (not serverside), and the content of some page are loaded via ajax request, so google bots can't see the text (this is the problem here).
I read that I need to use SSR to do this. So I tried a couple of tutorials but no one seem to works (some do nothing, others crashes my app). I don't really know which one is the best and they are all using differents solutions.
First of all, do I need to use SSR to achieve what I want ? And if yes, anyone have a good tutorial (and a working one) ?
Thanks guys !
The best solution for SSR with Vue is to use Nuxt.js: https://nuxtjs.org/
It's not that complex, working really great !
It will probably be migrated to Vue3 really soon (Nuxt 2.15.2 is using Vue2 still), maybe even today during the JS World Conference.
Also, you can check those videos of Debbie who does a nice job of explaining things in a clear and simple way: https://www.youtube.com/c/DebbieOBrien/videos

How can I use CKEditor 5 classic in VueJS 2 WITHOUT NPM?

My question is simple. I'm using VueJS 2, and I want to implement CKEditor 5 Classic. I know better than to just hook it up in HTML, but due to constraints I can NOT use NPM/Webpack. I need a component wrapper that's in JS format.
Can anyone help?
What do you mean when you say "I know better than to just hook it up in HTML"? After all, the files are included in your HTML anyways, that's how HTML works with JavaScript.
The best option is to use the corresponding source-file from CDN of CKEditor. Either by including the direct CDN link or (in case you have doubts about availability) after you download them manually or via shell and ship them with your application.
If you don't want to go one of these ways, I don't think you'll be able to use the desired library at all.

Alternate for template engines in express

I dove into express.j and encountered pug (template engine).Now, i don't like the idea of writing code that works very similar to HMTL+ some identation.I'd rather stick with normal HTML.I want to discard view engines altogether . Is there another way to hook these html,css and javascript files instead of pug.I read Angular is utilized. Could someone elaborately with a form examlple,styled with css and how to integrate Angular with express.js . Perhaps any tutorial available online...
P.S. Please refrain from using too much technical terminology..I'm a noob. Simple english is appreciated.
You can use 'handlebarsjs'.
That is a great tutorial to get start.
https://www.youtube.com/watch?v=1srD3Mdvf50
Good luck.

Anybody using Aurelia with graphql

My backend exposes graphql wanted to know what is your experience with aurelia and graphql.
Are there any good libraries out there to use?
I could only find a minimal apollo bind library here https://github.com/stphdenis/aurelia-apollo-bind
Aurelia does not impose any restrictions. From examples I see in graphql docs there is nothing you can't do with Aurelia.
There is no need in specific bridge or wrapper library.
I suppose you can use this Angular 9 sample https://www.youtube.com/watch?v=GifdPhc_OWU
You will need the same GraphQL queries generator. And a similar way of calling a back-end.
I guess it is even possible to write content item templates in Aurelia syntax in place of Liquid templates of content type definitions, gather them to front-end along with JSON and render together. I would try to achieve that.