how to host ejs (Embedded JavaScript templating) , expressjs app in vercel - vercel

i want to host my expressjs application at vercel but not wo0rking at vercel my view is available at
This application is built in expressjs and nodejs
views/index.ejs
i have also already added vercel.json file in my project
please answer ?

This is not possible on Vercel, according to the following discussion:
https://github.com/vercel/vercel/discussions/4541

Related

React native project to use heroku express url

I have heroku backend express server project.I have react native project. I am trying to use heroku express url in my fetch in react native.. but I am getting network request failed.
I have two questions.
1.Why is that url not working in react native fetch, but opening in heroku.
Like react, can we put static files in build and try to serve that build in express app.use(express.static("client/build"));
Thanks a lot in advance.

Is it possible to use react-native-web to create PWA?

We are creating a web site which we want to use RN-web. (it's back port from RN app)
We'd like keep the possibility of converting to PWA later, wonder if it's possible to convert RN-web to PWA?
If you created your application with the expo-cli, now it's super easy to do it.
Expo web projects generate PWA assets and manifest by default, you only need to enable offline web support to get a full PWA.
You can follow the documentation https://docs.expo.io/guides/progressive-web-apps/
And enable service workers on your react native app https://github.com/expo/fyi/blob/master/enabling-web-service-workers.md

Create React App - Router paths not serving javascript

I have a CRA site that has been deployed to Amazon S3.
When the router paths have a / in the url the Javascript or CSS is no longer loading. (i.e. it's trying to load from example.com/subdomain/static rather than example.com/static)
I've tried setting PUBLIC_URL='/' in .env.production and that's not helping.
Any clues on how to get URLs working again.
Any
homepage was not set correctly in package.json

Impossible to use proxy

I'm trying to use proxy with my react-native app (build with CRNA and Expo).
So in my package.json file I put : "proxy": "192.168.1.27:8080" and then make simple get request with fetch with the/users` path and react call me network error (he don't see the proxy param, just /users when I'm debugging).
The fetch request work well if I put the full url.
In react (for website) I do the same thing and that's work to.
Thank's for your help.
In Reactjs proxies are mainly used to avoid cors issues. Since React Native connects to iOS & Android natively, there is no browser issue so you don't need a proxy.
The approach I use is to call http:127.0.0.1:nnnn/api/route (not localhost) in the React Native app when testing the backend, and the deployed url in production. So you can deploy your server separately and reach it directly in the app.

is it possible to run sails & nuxt on a single express instance?

I understand that the intended setup is.
Seperate backend server (e.g. Sails, Laravel, ...)
plus frontend server with nuxt.js or prerendered static content generated with nuxt and statically hosted (e.g. AWS S3, now, ...)
I am wondering if it is also possible to run sails and nuxt within the same node/express instance.
Nuxt.js can be used as a middleware so i think you can. Check the docs: Using nuxt.js programmatically