Newbie needs help trying to deploy a flask server alongside a Hastebin server via NPM

Problem Description

Main Information

I’m attempting to follow a tutorial on how to run an NPM Server, but I’m worried that I might be getting errors either because I’m inexperienced, or because I’m running a flask WSGI server alongside it, and they could be conflicting (they are running on separate ports). Some other things to note, my server is running ipv6 and the domain explicitly requires the use of SSL. I’m using certbot as shown in the tutorials below.

Additionally, attempting to do systemctl enable default like I would expect to start the service for the server results in the following error: Failed to enable unit: Unit file default.service does not exist. I’m aware now that the Unit file I created in the Flask tutorial (below) is exactly what this is, but since NPM and Flask are different things (sockets, python)… I’m completely unsure of what to put in there, I don’t have the slightest clue.

Minor information

I’m looking to run the flask server at root (./) and have it control stuff there, but the Hastebin server at ./hastebin. The hastebin server is running on port 7777 currently.

I’m honestly clueless about how the nginx configuration files work, so I will need some help and direction as to what to actually put in the configuration files.

My flask server is running on user xevion at ~/testproject/ (unit myproject).

I apologize if I didn’t include any actually useful information, I tried to think up as many details as I could think of concerning my current objective and problems. Feel free to ask for any configuration files, command outputs etc. as you can if you think it’ll help me and you resolve my problems.

Tutorials Followed

I followed most tutorials in here nearly word for word, so it can be expected that most names and things will be in the same location under the same or a similar name.

Hastebin GitHub Hastebin GitHub Installation How to setup a NodeJS Application for Production on Ubuntu 18.04 How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 18.04

Basic Info

OS Version

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

Nginx Webserver Version nginx/1.14.0 (Ubuntu) NPM Version 6.9.0 NodeJS Version v12.4.0

Configuration Files

/etc/nginx/sites-available/default ~/haste-server/config.json

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer