How to deploy nodejs and express REST APIs to Shared Hosting including database
HTML-код
- Опубликовано: 19 дек 2020
- In this video, I’ll be going through a detailed tutorial of hosting your Node.js and express app, with your own domain and with shared web-hosting
Build RESTful APIs with Node.js express and MySQL | Authentication with JWT | In one Video
• Build RESTful APIs wit...
In 20 Rs Get Premium hosting || Best Hosting Provider || GoViralHost
• In 20 Rs Get Premium h...
How to Connect GoDaddy domain name with Web Hosting Server
• How to Connect GoDaddy...
Follow me on
Instagram: / tariquerkl
tiwitter: / tariquerkl
Linkedin: / tarique-akhtar-ansari-...
After watching so many videos. This is the one video which show step by step complete process.
Thank you sir, for its nice tutorial, learning full tutorial.
Thanks a lot, for your nice tutorial, learning full tutorial.
Hi Sri, very nice video. Can you please help me to guide for similar scenario: my main app is api routing based and in the same hierarchy I have given client as frontend.
In such scenario, what should be right approach?
Thanks!!!
You just earned yourself a like and a sub!
Amazing video
Thank you bro ❤🎉 Much appreciated ❤
Could you please tell me if i want without restarting my server after changing in js file through cpanel what should i do ? like in local we use nodemon but what should we use to restart the node server not by manually ? Please help me
Thank you my dear you save my time wish you joyful life.
Hello thanks for the video but I have a problem that my cpanel does not have setup nodejs application button how can I add it ?
m not able to my app deploy on server there is nodejs setup not available in software section like python etc as you did in this video. plz suggest me how can I do.
hi, I follow same step as shown in video but when I trying to trigger any api then it show not found. can you guys help me out what I did wrong or provide the project whose deployed in video.
My doubt is in file manager , where you have added the project have only one node folder. How to add multiple node js app in one node folder in file manager?
will be any change in steps or config if iam usin es6 modules (import & export) not require
Hi, if we do not give the port to the server, then how will our Frontend application contact the backend. I mean which port?
Great tutorial!
Are the the variables necessary in hosting your api?
An error occured during installation of modules. The operation was performed, but check availability of application has failed. Web application responds, but its return code "500 Internal Server Error" or content type before operation "text/html; charset=UTF-8" doesn't equal to contet type after operation "text/html; charset=UTF-8". i have this error when run npm install
help me out in deploying REST API developed using NodeJS, ExpressJS, and TypeScript. Its working fine when I use file extension as .JS. But, its not working when I use TypeScript
Thanks for sharing this information, some can guide please about hosting platforms that support this
Hi, your videos are very useful to me to learn RESTAPI, can you post video how to host nodejs express rest api in windows IIS server
hi thanks for the video really impactful...Please , i created an api endpoints for registration,login,otp and password...which is working. But am challenge storing users to my database without using prams. Which means, i need too always pass the users id. I would need your help in solving these challenges. Thanks
great video!
Error
/home/dgpmallc/nodevenv/nodejsapp/12/bin/npm: fork: Cannot allocate memory
I get this error when i run npm install. Can anyone tell me why?
hi friend ... how can set environment variables in database.js file ... and what about .env file
what hosting provider did you use?
I am getting this error when i click run node js
Cloudlinux NodeJS Selector demands to store node modules for application in separate folder (virtual environment) pointed by symlink called "node_modules". That's why application should not contain folder/file with such name in application root
Thank you very much ;)
thank you so much bro
what is the diff between mysql database and mysql database wizard
Hi Man! On my cpanel don't show the option for install node! What can i do??? Thanks
tanks for the video
i need help how to uploaded APIs express with swagger, still error
Thanks brother
Which hosting service provider you are using here
thank you sir ji
How to deploy MERN Stack App like this. which has package.json file in the root folder then backend and frontend folder and server.js file is available in backend folder. I have tried to deployed it but website showing "503" error.
did you find any way?
Thanks you sir
could i ask how to deploy restful api which will be used for my nextjs project?
Thank you..
Pls can anyone help me about node_env, what to write in it, and where to add it
I'm using mongodb database how to upload on nodejs express api in shared hosting
Obrigado, me ajudou muito, 🇧🇷
This is great aritcle,
is this safe to keep database credential information in env file on server?
Thank you yes as long as your shared hosting password is not compromised
Not Happy man! This code you say is same as you have covered in a tutorial, but the code is actually different. This code, which you are deploying contains extra changes.
After i followed that tutorial, working fine in localhost, but to deploy you have made more changes which you did not show in that tutorial, but those we can see here.
Please help!
Any body can help me please?? I have a website of react. I wanna change its index page . But i couldn’t find files in cPanel .
Please guide me from where i can get access to them . And how can I change index page .
Normally with React you put the build folder in the public_html folder. And the build folder just contains index.html file, not index.js
My cpanel is not detecting package.json what shud i do?
Hi, thank you for your great video. I have a nestjs application inside a monorepo. I followed the video and uploaded all files and folders to server. But there is no app.js in the root directory! Which file should I choose as application startup file?
I need you help.. please for same issue
@@chrisbrown-ll3740 Use that .js file that you have instead of app.js file
I was using Plesk.
@@chrisbrown-ll3740 That is quite simple and straight forward but need a bit workaround.
thanks!
Wow
Hello sir, I have a frontend built with React and a backend built with Node JS and Express. I am hosting the site with cPanel. How can I do this? Please help me sir.
How did usort out this..also seeking some guide.
can we use typescript instead js like index.ts instead of app. js as startup file in cpanel
no, but you can turn your .ts applications into .js with typescript package and runem with nodejs
❤❤❤❤❤ thanks
How about npm run build?
can we get repository link of your app
Dear friend, my app show this error , please help me
returncode: 1
stdout:
> express@0.0.0 start /home/qfyjnwwb/express
> node ./bin/www
stderr:
npm WARN lifecycle The node binary used for scripts is /home/qfyjnwwb/nodevenv/express/12/bin/node but npm is using /opt/alt/alt-nodejs12/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
Port 4000 is already in use
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! express@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/qfyjnwwb/.npm/_logs/2021-02-08T12_06_52_607Z-debug.log
How to deploy mern app on domain
If you buy shared hosting from BlueHost or GoDaddy, you wont get the Nodejs option in the cpanel.
which hosting service?
Bro, thx for the video, but i have a question. Is possible to install python with nodejs?
No both are different
is this API secure ?, if i want to do with https
I am using nestjs instead of nodejs. It needs two parameters. One for port and one for call back. I remove the port form app.listen() as you mentioned. Now it gives me error while build it. It says the port is required. What should I do . Any help guys?
First build then remove from build file
@Technical Babaji Thank you it solved my problem. I have another weird problem. Everything works fine including login, logout, user registeration, and displaying permissions list. But I am using an ABSTRACT class that should return this data:
async paginate(page = 1, relations = []): Promise {
const take = 10;
const [data, total] = await this.repository.findAndCount({
take,
skip: (page - 1) * take,
relations,
});
return {
data: data,
meta: {
total,
take,
page,
last_page: Math.ceil(total / take),
},
};
}
with this format:
export class PaginatedResult {
data: any[];
meta: {
total: number;
take: number;
page: number;
last_page: number;
};
}
user class and email class extends that ABSTRACT class.
Angular httpClient Get requests to 'mydomain/api/users' and 'mydomain/api/emails' returns error.status 500, error.error [object object] and error.messge internal server error.
While the same code 100% works on local host.
Any help would be most appreciated. Thank you.
Note: My Angular and NestJS apps are undersame domain. I am using Plesk cpanel with uses Apache and use nginx for reverse-proxy
help me.. please
Getting access denied to the user issue
Is it possible to host my application, Database and API on same domain name ?
Yes but with different path name
100000 likes than u
Salamat Tariqu, Which cpanel is that?
Goviral webhost
Error ID:
9e41db4f
Details:
Web application could not be started by the Phusion Passenger(R) application server.
Please read the Passenger log file (search for the Error ID) to find the details of the error.
You can also get a detailed report to appear directly on this page, but for security reasons it is only provided if Phusion Passenger(R) is run with environment set to development and/or with the friendly error pages option set to on.
For more information about configuring environment and friendly error pages, see:
Nginx integration mode
Apache integration mode
Standalone mode
when i click on apllication url i have show this error
Bro how did u solve this?????
Bro did you solve this error please replay
Will it be work if I use MongoDB in rest api?
Yes It will work
@@TechnicalBabaji1 Are you sure it will work if I connect mongdb url?
Please make a video how to use nodejs mongodb api in cpanel
bhai agar node'js application installer nahi ho too
hosting ki cpanel me dekhna agar hogi to hi nodejs ko host kar paoge
@@ShailendraSharmaDark C panel me node js nahi he
"Cannot GET /api"
any update on that?
im not sure if any1 helped you or not so - when you deploy your own app from the local host, you probably set your routers like app.use(userRouter,'/users').. which is fine in the localhsot but when you use cPanel and you called your app main url "urDomain/api" for example, you'll need to change it to app.use(userRouter,'api3/users') - now it will redirect the request to the correct route and it should work.
is this free?
Hi I am getting the following error could you please provide any solution
Instead change the require of index.js in /usr/local/lsws/fcgi-bin/lsnode.js to a dynamic import() which is available in all CommonJS modules.
at startApplication (/usr/local/lsws/fcgi-bin/lsnode.js:48:15)
at Object. (/usr/local/lsws/fcgi-bin/lsnode.js:16:1) {
code: 'ERR_REQUIRE_ESM'
I am using "type" : "module" but I think it require "type": "commanjs"
is there any quick solution instead of converting the whole project manually
Hi, can I have your email? I want to ask about hosting node js and install express in my hosting. I have an error, plsss 🙏🏻