Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
Codecamp
ResizeCodecampSpeakerImages
.gitattributes
.gitignore
Codecamp.sln
Codecamp.sln.DotSettings
README.md
azure-pipelines.yml

README.md

Code Campster

Welcome to the source code for Code Campster!

Getting started

This site requires that the computer you are working on has the .NET Core 2.1.4 SDK installed, and access to a SQL Server database for the project.

First time setup

You will need to have access to create a SQL Server database in order to run the site. Make sure that your user has rights to access that database. You can verify this by logging in through SSMS.

You can override the connection string by setting an environment variable.

This is a powershell example. In this example I am configuring a local database named orlandocodecamp2019:

$env:ConnectionStrings__CodecampDbContextConnection="Data Source=.;Initial Catalog=orlandocodecamp2019;Connect Timeout=30;Encrypt=true;TrustServerCertificate=true;Integrated Security=true;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"

After the environment variable is setup, you need to build the site and run the database update:

cd Codecamp

# restore nuget packages and build the project
dotnet build --configuration debug

# create/update the db
dotnet ef database update

Finally, the site requires a record in the Events table so run this statement to get the data all setup.

INSERT INTO [dbo].[Events]
           ([Name]
           ,[SocialMediaHashtag]
           ,[StartDateTime]
           ,[EndDateTime]
           ,[LocationAddress]
           ,[IsActive]
           ,[IsAttendeeRegistrationOpen]
           ,[IsSpeakerRegistrationOpen])
     VALUES
           ('DEV Orlando Code Camp'
           ,'#hashtag'
           ,'2019-03-30 09:00:00'
           ,'2019-03-30 17:00:00'
           ,'Somewhere in Lake Mary'
           ,1
           ,1
           ,0)

Now you can continue on to the normal "Running the site" instructions below.

Running the site

After you've followed the instructions above and have an initialized database you can do the following steps

# you need to be in the ./Codecamp directory
cd Codecamp

# create/update the db
dotnet ef database update

# build the project
dotnet run

Verifying the published files

There are many different methods available for publishing, but one easy way to troubleshoot deployment problems is to test out a local deployment.

.NET Core makes this really easy, just run through the following commands below to run the website from the published files.

# Make sure you are in the website project directory
cd Codecamp

# Publish the directory to disk:
dotnet publish --configuration=release

# cd to the output directory
cd bin\release\netcoreapp2.1\publish\

# Run the website
dotnet .\Codecamp.dll

Read more about dotnet core hosting options in the official documentation.

You can’t perform that action at this time.