Running as existing app in node.js Loopback project - node.js

I am going to take over an existing project developed in node.js with looback framework. I have installed and configured the frameworks correctly and tested by creating a demo application also.
But when I try to run the existing application it is showing an error,
I tried this command to run the project
from the root directory : slc start
Error is
Error: connect ECONNREFUSED 127.0.0.1:8701
Any body have knowledge to solve this issue ?

Related

AWS EC2 instance is working but can't connect to it via browser

I have a nodejs app running on an EC2 instance. I installed the webapp using Ubuntu server 18.04 and node version v16.x using this link:
Node installation guide v16.x
To run the project I used the following tutorial: Tutorial link
The problem I am facing is that when I run the starting command npm start my app launches on the server using port 3000. But whenever I open the link provided from AWS which in my case is : https://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com it doesn't respond. I saw some similar questions and most common answers were to edit the inbound security groups which I did.
But it still doesn't work. I also tried to access the link with http only like this:
http://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com:3000 but it still doesn't work. Any help will be highly appreciated, because I spent 2 days struggling with this issue and I see that I don't make any progress.

Azure Application error, but no issue in the logs

It is really frustrating as I am not able to resolve this issue of Application error. The app is up and running however when I try to access via azure URL, it gives the application error. Help would be appreciated
The error message
No issue in the logs, app is up and running
Your webapp is deployed on the Linux platform, and it is temporarily unclear what language your webapp is written in from the log.
Regarding the problem of Application Error, we usually add Startup Command to solve this problem.
Prerequisites:
Make sure that the port defined in the code uses the process.env.PORT parameter.
Example: In the nodejs project, when we are testing locally, we can define it like this:
const port = 8081 || process.env.PORT.
Then we need to add the startup command.
① If it is a vue project, the recommended command is
pm2 serve /home/site/wwwroot --no-daemon --spa
②If it is react or angular, it is recommended to use
npx serve -s
If you are using Python, you can refer to the following document.
Configure a custom startup file for Python apps on Azure App Service

ReactJS, NodeJS deployment issue on linux server where application was coded in windows

I have a web application created using ReactJS , NodeJS and Mongo DB on windows. And I am facing issues while deploying the same application on a Linux Server in AWS. Is there any changes to be considered while deploying such?
Is there any changes that needs to be done for the code? Does the path declaration change on the config file?
getting such errors? ENOENT: no such file or directory, stat '/home/ec2-user/Project/Backend/Backend/client/build/index.html'"

Running AdonisJS on C9.io

I'm trying to create a new Node.JS app using the Adonis framework. I'm using c9.io as my IDE.
I've succesfully installed everything and created a new project. But when I run it (using npm run dev) c9.io keeps showing me the "No application seems to be running here!" message.
The .env file is set for port 3333 for default. But I also tried changing it to 8080, and nothing changed.
Anyone managed to run AdonisJS on c9.io before? Thank you!
Make sure you are running the app on 0.0.0.0, not localhost. Localhost won't work on Cloud9 so you'll need to use 0.0.0.0 or process.env.IP (which will usually be the same thing).
I created a github for installing AdonisJS on c9 for anyone using this Framework on Cloud 9, as I imagine more people will run into issues installing Adonis on c9.
https://github.com/Devitgg/Cloud9-Adonis-JS-Framework-Installer

How to run the seed.js, given in the generator-angular-fullstack, on OpenShift?

I'm developing an app, using MEAN.js and its generator (https://github.com/DaftMonk/generator-angular-fullstack), and Openshift as a hosting.
The project template of the generator includes a script (server/config/seed.js) to populate the database with two users.
In localhost, it is called automatically, but I also can call it using node server/config/seed.js (suppose you're on the root app directory).
The problem is, when I deploy it to Openshift, I run it and no error is reported, but the mongodb database is not updated. The exactly steps I do to run it on Openshift are:
Connect to ssh: ssh ....
cd app-root/runtime/repo/
`node server/config/seed.js``
What am I missing?
Thanks in advance.
You have few options:
in server/config/production.js add
seedDB: true
or change NODE_ENV to development coz during 1st deployment it is set to production
then
grunt
grunt:buildcontrol:openshift
should be working now

Resources