Share routes and other files between two or more Aurelia projects - aurelia

I want my website and mobile application (runs in a WebView) share the same code. Both website and mobile application use <router-view></router-view>. I want my website to use different index.ejs, app.html, app.js and layout.html than mobile application, but use the same routes and other files? Is it possible to configure two Aurelia projects to sit in the same folder and use different files?
Or using two folders with symlinks is the only option?

Related

React-Native: Share file

I'm a web developer (React) and I'm facing in my first react-native App. The context is an app where user can create and configure recipes. The app is without any type of authentication (at the moment). Now I would like to implement a Share functionality to share a recipe through social and messaging apps. The user clicking in the shared content open the app and can view the recipe.
At the moment I used react-native-fs and react-native-share to create and share a file (json or txt). Now I have problem to open app clicking the file shared. I saw some example of DeepLink but all the example involves only web resources. There are any way to use deeplink with file?
There are better pattern to achieve my objective? (considering the use case where there are only Application without any backend and server)
Thanks in advance.

Differences and use of vuexpress, VuePress and vue-server-renderer modules of Vue.js

I came across vuexpress, vuepress and vue-server-renderer. To me these are looking somewhere similer which I guess are not. I am not frontend developer so not able to understand exact difference and use of these three modules.
Their official sites are saying
https://github.com/vuexpress/vuexpress
vuexpress: Vue + Express.js = VueXpress / A server side rendering
engine for Express.js. Use .vue files as your express.js templates.
https://vuepress.vuejs.org/
VuePress: Vue-powered Static Site Generator
https://ssr.vuejs.org/
vue-server-renderer: server-rendered Single-Page Applications using
Node.js as the server.
vuepress and vue-server-renderer are official library from Vue.js
So what exactly are differences and use of these three modules?
The idea with Vue (from the perspective of your question) is that you create a single-page application.
vuexpress is a rendering engine you can use in an Express application if you want to use the Vue syntax to implement your Express views, i.e. you implement a dynamic website and use the Vue syntax.
vuepress is about building a single-page application in Vue that also prerenders each page (and some other goodies, such as using markdown) to improve initial page load and facilitate for search engines. It is primarily used for websites with static content, such as documentation.
The point with a Vue application is to run it on the client (in the web browser). With vue-server-renderer you can run it on the server to obtain the HTML code the web browser would render if it would run in the web browser, and send it to the web browser, so the web browser doesn't need to run your Vue application, but receives the HTML it would display instead. Why? To improve initial page load and facilitate for search engines. I imagine vuepress makes use of vue-server-renderer under the hood.

How to render a template in VueJS to be used on index.html

We have Rails app with Webpacker that serves just the initial HTML file, after which the client will download everything (inc. vue .js and .css) files.
Our problem is that we want to display something initial on the html so the user will feel as the site already loaded. This logic is in the main vuejs component. Is there a way to offline render this so it will be easily be embedded on our index page? instead of having to maintain and re-write this everytime?
It sounds like pre-rendering might be a better fit for you than full-on SSR. Since you're already rolling Webpack, there is a plugin that helps to that end called prerender-spa-plugin: https://github.com/chrisvfritz/prerender-spa-plugin
The idea behind this plugin is that, as part of your build process, it prerenders the resulting static HTML of your SPA using Puppeteer (i.e. headless Chrome), and drops it into your static HTML folder. It maintains links to your SPA code so it's still fully functional, it's just fully rendered by the time the user hits it.
What I'd suspect you'd want to try is the following:
Add the prerender-spa-plugin to your webpack.config.js
Configure the plugin to prerender your initial route and any additional routes that are truly static
Output the resulting files to the folder your Rails app uses to distribute static assets (HTML, CSS, images, etc)
Going the pre-render route is actually technically superior to SSR for truly static routes like a landing page or marketing pages. You won't need to mess with a complex pre-render setup on your Rails server, you offload content distribution to the static folder (i.e. lesser load on your Rails server), and you still get to use all the benefits of your SPA.
That being said, if you strongly feel like you do need full-blown SSR, the generally "accepted" approach is rolling a Node.js server (https://ssr.vuejs.org/). If you decide to go down this route, I'd keep your SPA assets in their own separate Git repo from your Rails server and manage DevOps appropriately.
Good luck!

Hosting a custom Angular App in the cumulocity

We are creating a custom Angular App which uses only the services of cumulocity and not any cumulocity based plugins.
If i host this app inside the cumulocity, the app will work or not.
Please clarify. We are needing answers for many question but we don't have until now.
Please help us to support Soon
Thanks
BA
After your comments i have created application folder which contains certain assets, index.html etc..
At the end i zipped and uploaded in the tenant. When i clicked the application it is going to 404 not found.
Attached the screen shot for your reference.
https://tempar.adamos.com/apps/custom-app/index.html
If your app has no relation to the plugin concept all you need is the application manifest in the ZIP file you are uploading (http://cumulocity.com/guides/web/introduction/).
Also ensure that on root level of the ZIP file there is the index.html

Copy web-builder created website to new hosting

I have a website created in a web-building online app (link to the app: http://www.webnode.com). The app doesn't allow me to actually view the folder structure of my web, it's something more like creating a blog using blogspot by google or similar web apps.
The problem is that I want to quit using that web builder and map the whole website to my private hosting. In order to do it I need to get somehow my web created in this app into the folder structure (or any other uploadable structure).
I'll be very grateful for any kind of advice
It can be easily done using winhttrack application, which downloads entire website to your computer.