Flask by default runs on port 8000. To run on a different port use:
python3 -m flask --app your-flask-app run -p 3000
From here.
Articles, notes and random thoughts on Software Development and Technology
Flask by default runs on port 8000. To run on a different port use:
python3 -m flask --app your-flask-app run -p 3000
From here.
External python dependencies can be installed with pip, and managed as a list of dependencies for your project with a requirements.txt file. To install dependencies for a project, use:
> python3 -m pip install -r requirements.txt
On MacOS, it’s no longer possible to install global modules, unless you force the install with the ‘–break-system-packages’ option, if you pip like above, you’ll see the error:
error: externally-managed-environment
× This environment is externally managed
Instead, create a virtual environment for your project where dependencies local to your project are installed:
> python3 -m venv .venv
> source .venv/bin/activate
Now you can run pip install and all dependent modules will be installed beneath .venv in your project folder.
If you browse online software development communities, questions from new developers about AI replacing the need for developers are asked almost daily.
Here’s a couple of my past posts on this topic from 2023 and 2022 which I feel still hold true:
The EB cli provides an ‘eb ssh env-name’ command to provide ssh access into a running EC2 instance. If the environment wasn’t setup to enable ssh, you’ll see this:
> eb ssh test
ERROR: This environment is not set up for SSH. Use "eb ssh --setup" to set up SSH for the environment.
After running ‘eb ssh –setup’ you’ll be prompted to confirm the environment name, and then select a previously configured SSH keypair to use to provide auth when logging on to the instance.
If an EC2 instance is already running in the env, this setup step configures new EC2 instances to enable ssh, and then conducts a rolling update to take down any previously started EC2 instances and replace them with new instances.