- Install .NET Core v.2.1+, Node.js v.8.9+ (if you haven't it). See notes below for more information
- Clone a current repository
https://github.com/beylkhanovdamir/LocalNuGetFeed.git
- Navigate to
.\LocalNuGetFeed\LocalNugetFeed\ClientApp
- Run the
npm install
command - Run the
ng build --prod --aot
command. See notes below if you're using macOS before runningng build
command - Move up on one level up to
.\LocalNuGetFeed\LocalNugetFeed\
- Build the service project by
dotnet build
command - Start the service by
dotnet run --environment=Production
command - Open the URL http://localhost:5000/ in your browser
NOTES:
- Check the version of npm which should be 5.5.1 or higher, also you can upgrade it using the following command:
npm install -g npm
- If you're running a service on macOS and you don't have globally installed
angular/cli
package, then you should run the next command:
$ alias ng="./localnugetfeed/localnugetfeed/clientapp/node_modules/@angular/cli/bin/ng"
Run the below command:
dotnet nuget push -s http://localhost:5000/v3/index.json {PackageFilePath}.nupkg
where {PackageFilePath} is the path to your NuGet package
You can run this service on Docker.
- Build the docker image by the following command:
docker build -t localnugetfeed .
Make sure that command was successfully completed to start use your tagged docker image localnugetfeed:latest
-
Run the
docker run --rm -it --name localnugetfeed -p 5555:80 localnugetfeed:latest
command -
Push nuget package using the next command:
dotnet nuget push -s http://localhost:5555/v3/index.json {PackageFilePath}.nupkg
-
Open the URL http://localhost:5555/ in your browser and try to search for your packages