Skip to content

techswitch-learners/whale-spotting-2023-jan-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Whale Spotting Backend

Setup

First, run dotnet build.

Create a new role in your Postgres installation with login and create database permissions. (For example, whale-spotting with password whale-spotting.)

Then, set the two environment variables DATABASE_URL and USE_SSL. These follow the format:

$env:DATABASE_URL = "postgres://whale-spotting:whale-spotting@localhost:5432/whale-spotting"
$env:USE_SSL = "false"

(Note: the three whale-spottings in the DATABASE_URL are the username, password, and database name, in that order.)

Then, run the migrations to create the database with

dotnet ef database update

If this succeeds, you are successfully connected to the database!

You can then run the app with dotnet run.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages