Django, unable to start on local:host - python-3.x

I am using dj4e in pythonanywhere.com, I am trying to start the project but it gives an error saying that port 8000 is already in use. I tried to run from another port but nothing.
In dj4e's document, it says I can't use "runserver" command in
virtualenv.
Could somebody help me running the local server, please?

You need to deploy your web app to run it on PythonAnywhere. runserver would not work there. You may follow https://help.pythonanywhere.com/pages/DeployExistingDjangoProject/

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.

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

Getting error in package.json while uploading to Openshift server

I am getting following error when i am trying to push my application to Openshift server. I have updated only package.json and trying to upload it on server then it showing this error.
So i have written couple of command to find out this error. So i found the following error but i am not getting what should i do now to fix this error.
My package.json is following below. If you think that there is some error in this package.json, please inform me. It is running fine on localhost but i do not know it is not able to find out package.json.
it's possible that the existing running application is not getting stopped correctly. Try using the rhc app stop command to completely stop your application, and then ssh to your gear (rhc ssh) and use the "ps -ef" command to make sure nothing else is running that would be taking up that port.

Unable to start the nodeapp through terminal

I have a node app locally and I normally run it using the run button in the web storm, which works fine. While I am documenting the project I came across this blocker: if I try running the same app through the terminal using the command: node app.js , the server starts but the browser throws and error stating "This site can’t be reached" "localhost refused to connect".
Because the port is occupied.
You can change it using app.listen({port})...
or
linux:
export PORT=4500
node server.js
windows:
set PORT=4500
node server.js
I found this myself.. since I used the scaffolding app and it stores info related to server at bin/www, so we will not be able to run the app using the command : node app.js but instead we could run the app using nodemon(which I installed globally on my machine)
Love nodemon for this awesome feature <3 :)

Getting 502 error in browser for a NodeJS app run with Forever

I have a SailsJS app set up on a Webfaction server. Everything works nicely (site can be accessed through browser, console works) when I run the app via any of the following commands, with and without the --prod param:
sails console,
sails lift,
node app.js
However, when I try to run the app with forever using forever app.js I get a 502 error, as if nodejs server isn't even running. When I run forever list I can see app.js listed among running processes.
How can I have my app run with forever?
Forever is considered outdated by many in the Node community, and thankfully, has been replaced by several other fantastic (dare I say, better) tools.
If you're running a newer flavor of Ubuntu, you can always install systemd and kick off the application that way. If you're seeking something more streamlined, Phusion Passenger might be your ticket. It has a long track record of successes, and I wouldn't hesitate to toss it into production.
I managed to solve this issue; the problem occurred due to SailsJS migration prompt which shows up when you start the server. Running app.js with forever worked, but the server didn't start because the script hanged waiting for a prompt reply. If you encounter this issue just make sure you have your migrate option set in model config to avoid running into migration prompt.

Resources