Coder Social home page Coder Social logo

hhy5277 / chocolatey.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from segilbert/chocolatey.org

0.0 2.0 0.0 35.93 MB

Home Page: http://chocolatey.org

License: Other

PowerShell 3.14% Batchfile 0.01% C# 62.57% HTML 17.13% CSS 13.04% JavaScript 2.88% ASP 0.94% TSQL 0.28%

chocolatey.org's Introduction

Chocolatey.org

http://chocolatey.org

CONTRIBUTING

Getting started

  1. You will need a local running instance of SQL Server and Visual Studio 2013 or above
  2. In Visual Studio, open ChocolateyGallery.sln
  3. In the Website project, open web.config
  4. Locate the connectionStrings section, and modify the NuGetGallery connection string to point to your local instance of SQL Server. It's not a bad idea to change the database name (initial catalog) just to avoid confusion. For example if your SQL Server instance is named SQL2016, you could use: <add name="NuGetGallery" connectionString="Data Source=.\SQL2016;Initial Catalog=Chocolatey;Integrated Security=SSPI;MultipleActiveResultSets=False;" providerName="System.Data.SqlClient" /> Note: the database does not need to exist
  5. Open the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console)
  6. If prompted, restore any missing NuGet packages (Don't use nuget restore from the command-line as this will pull in extra packages that cause the build to break)
  7. Run the Update-Database command in Package Manager Console (if the command is not found, try reloading the solution in Visual Studio)
  8. The database named in the connection string should now exist in your SQL Server.
  9. Press Ctrl-F5 to start the web application without debugging
  10. Your web browser should launch, showing the chocolatey home page
  11. Click Signup and enter details to create a new account
  12. To make this account an administrator, run the following SQL against your new database eg. Use SQL Server Management Studio or sqlcmd from the command line. Note: Replace 'username' with the name of the user account you just created
DECLARE @adminId int
SELECT @adminId = [Key] FROM Roles WHERE Name = 'Admins'

DECLARE @userId int
SELECT @userId = [Key] FROM Users where Username = 'username'

INSERT INTO UserRoles(UserKey, RoleKey) VALUES(@userId, @adminId)
  1. You should now be up and running!

Known issues

When debugging, you might see this exception: SimpleInjector.ActivationException: 'The given type IControllerActivator is not a concrete type. Please use one of the other overloads to register this type.'. Just ignore this and keep running.

Leave items as they are in the nugetgallery folder

  1. Please don't fix anything in the nugetgallery folder or subfolder. Instead you should copy the unchanged item over to chocolatey/Website.
  2. Then remove the old item from the Visual Studio project and add the newly copied item to the project.
  3. Save the project and commit your changes.
  4. Make your changes as normal now.

chocolatey.org's People

Contributors

achalddave avatar admiringworm avatar ajdelgado avatar alanstevens avatar andreyakinshin avatar andyedinborough avatar basarat avatar cfoellmann avatar chad-ramos avatar chadwhitacre avatar chrismaddock avatar ferventcoder avatar flcdrg avatar gep13 avatar huslage avatar jborean93 avatar jochenkirstaetter avatar just3ws avatar marsjaninzmarsa avatar mikecole avatar mkevenaar avatar motowilliams avatar mwrock avatar pascalberger avatar patrickkettner avatar pauby avatar peterdavehello avatar redsandro avatar st3phhays avatar tomone avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.