How to use context path in Glitch custom domain? - glitch-framework

I am hosting a nodejs app at glitch and adding a custom domain https://api.custom-domain.com from GoDaddy.
I want to host it under a subdirectory nodejs i.e. https://api.custom-domain.com/nodejs/
Is this possible with glitch without nodejs routing?

Related

how to connect and deploy a flutter app to "real server" base on .netcore+iis+sqlserver

I have a project to make a website and application, and i did it by .net core and sql server and deploy it on iis and finally real server and special domain. Also i did my flutter app and tested it by url on local host ('http://192.168.1.110/project_Name/Controller/method_Name') to get connect with my database and it answered currectly,
But now i have a problem with my url to connect real server and create data on sql on server side(i can not find any special pattern to write url with domain-server-port and ...).
i dont know how to do it ,for example Should i add my fluttr app by iis or just change (new type of)url to get connection with my website backend ??
all of the sources learn about localhost.
could some one answer me about it or introduce appropriate source to guide??
One way to do that is to serve the flutter app as static files, you can achieve that by copying the output of flutter build web to the wwwroot folder of the ASP.Net core project should look something like this :
And then you need to serve it by adding the static files middleware in your request pipeline in your Startup.cs Configure method using the app.UseStaticFiles();
You should then access your flutter web application following the URL :
https://yourdomainname/index.html

How to deploy nuxt.js with mongodb on cpanel

I'm wondering any possible to deploy nuxt.js with MongoDB on cpanel hosting, i have a shared hosting bought from Hostgator. Really need help from this, thx.
my nuxt.config.js
For Nuxt, it depends on your build target and app mode. Are you using SPA or universal?
If you are using SPA, this can be packaged using nuxt build. This output can then be hosted the cpanel as a normal static site using something like Apache.
If you are using universal mode, you will have to ensure you are generating a static site using target:'static'. Once you've configured that in your nuxt.config.js, you'll be able to run nuxt generate and upload the built files to your cpanel.
Please take a look at the Nuxt page for static generation.
That said, I'd wholly recommend you don't use cpane or hostgator. Such hosting doesn't scale and relies on technology like Apache that is resource heavy and slow.
I'd suggest you deploy your Nuxt site to Vercel by following this tutorial here
Vercel is free for non-commercial use and scales infinitely based on your usage. It's incredibly fast and optimised for these types of sites. Deployment is a breeze.
You won't be able to deploy the MongoDB instance on the cpanel unless you have VPS access, or the cpanel has a pre-configured option.
I recommend you use MongoDB Atlas to easily provision, configure and manage your MongoDB instance.
When combined with Vercel, this should give you an incredibly easy and also performant deployment of your application.

How to access to a local domain -which is used in a mobile app- from iPhone on testing phase?

I have been working on a NativeScript project that uses an API. The API project is on my MacBook and haven't deployed to anywhere yet. It's based on Laravel and I use Laravel Valet as development environment.
I can't test the mobile app on iPhone because the app can't connect to local API URL. I know Valet has "share" command, but because the API consumes another API -which has IP restrictions-, it doesn't work for me. Sharing a local domain via Valet's share command is something like a proxy as I understand, so the consumed API doesn't work on that proxy.
I also checked articles about how to share Macbook's network with iPhone, but it only shares the same network. I can't access the local API still.
Is there any other way that can resolve my issue? Maybe a Docker based solution? I am not that good at Docker, but I can give a try if it is possible with it.
https://ngrok.com/ will happily expose your local Laravel Valet server.
Looks like there's a bit of a walk through on that here too https://mannyisles.com/using-laravel-valet-and-ngrok/ which may help?

yii2 remove backend/web and frontend/web from url

I am trying to change site url from http://localhost/yiiwebsite/backend/web/index.php url to http://localhost/yiiwebsite/admin and http://localhost/yiiwebsite/frontend/web/index.php url to http://localhost/yiiwebsite/.
Can anyone help me to do this.
It's described in official docs here.
Here is some basic info:
The application installed according to the above instructions should
work out of box with either an Apache HTTP server or an Nginx HTTP
server, on Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii
2.0 is also compatible with facebook's HHVM. However, there are some edge cases where HHVM behaves different than native PHP, so you have
to take some extra care when using HHVM.
On a production server, you may want to configure your Web server so
that the application can be accessed via the URL
http://www.example.com/index.php instead of
http://www.example.com/basic/web/index.php. Such configuration
requires pointing the document root of your Web server to the
basic/web folder. You may also want to hide index.php from the URL, as
described in the Routing and URL Creation section. In this subsection,
you'll learn how to configure your Apache or Nginx server to achieve
these goals.
By setting basic/web as the document root, you also prevent end users
from accessing your private application code and sensitive data files
that are stored in the sibling directories of basic/web. Denying
access to those other folders is a security improvement.
If your application will run in a shared hosting environment where you
do not have permission to modify its Web server configuration, you may
still adjust the structure of your application for better security.
Further configuration depends on chosen web server (Nginx / Apache), which is not even mentioned in the questoin. But both options are covered in official docs by the given link.
For shared hosting environment there is special section too.
And by the way this was asked before many times here on SO, just do a better research.

How to configure the base url of a Catalyst application?

I have developed a Catalyst application, which runs via the catalyst development server at, say, localhost:3000. Next I configured Apache to proxy requests to http://myhost/myapp/ to localhost:3000 using mod_proxy.
I would now like Catalyst to know that it has been publicly relocated to the base url myapp/ and take it into account when forming URLs via uri_for.
How can I do it?
KT, the easiest thing to do is to install Catalyst::TraitFor::Request::ProxyBase, as it is specifically designed to replace request base with the value passed by HTTP proxy.
The module is completely transparent and requires no modification of the existing app.