Giter Site home page Giter Site logo

arifkhan9898 / aspnetcorespa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fullstackproltd/aspnetcorespa

0.0 1.0 0.0 12.42 MB

Asp.Net Core 2.2 & Angular 7 SPA Fullstack application with plenty of examples. Live demo:

Home Page: https://aspnetcorespa.azurewebsites.net/

License: MIT License

HTML 15.22% PowerShell 0.54% C# 58.17% Dockerfile 0.35% JavaScript 0.28% CSS 3.35% TypeScript 22.10%

aspnetcorespa's Introduction

Build status Join the chat at https://gitter.im/asadsahi-AspNetCoreSpa/Lobby MIT license

Features

Pre-requisites

  1. .Net core 2.2 SDK
  2. Visual studio 2017 OR VSCode with C# extension
  3. NodeJs (Latest LTS)
  4. Microsoft SQL Server (Optional: If MS SQL server required instead of Sqlite during development)
  5. Docker (Optional: If application will run inside docker container)

Installation

1. Clone the repo:
    git clone https://github.com/asadsahi/AspNetCoreSpa
2. Change directory:
    cd AspNetCoreSpa
3. Restore packages:
    dotnet restore AspNetCoreSpa.sln
4. Run client project
    cd src/AspNetCoreSpa.Web/ClientApp:
    4.1. npm install
    4.2. npm start
5. Run .Net project:
    F5 from either [Visual Studio IDE](https://www.visualstudio.com/) OR [VScode] (https://code.visualstudio.com/):

6. Target either Sqlite or Microsoft SQL Server
    
This project supports both databases OOTB.

* Run with Sqlite: (Already configured to quickly run the project)
    * Project is already setup with Sqlite specific database migrations

* Run with Microsoft SQL Server:
    * Delete `Migrations` folder from src/AspNetCoreSpa.Web
    * Change setting in appsettings.json called `useSqLite` from `true` to `false`
    * This will use `SqlServerConnectionString` connection string pointing to default instance of SQL server installed on local machine

7. Identity server for authentication:
    This project by default uses a hosted version of Identity Server at this url: (https://aspnetcorests.azurewebsites.net/).

	2 Test users:
	Username: [email protected]
	Password: P@ssw0rd!
	OR
	Username: [email protected]
	Password: P@ssw0rd!
    
    Alternatively, you can run local version of identity server:
    a. Run `AspNetCoreSpa.STS` project from this solution
    b. Change  `StsAuthority` configuration in `appsettings.Development.json` or `appsettings.json` file inside `src/AspNetCoreSpa.Web` to the local running Identity Server URL.

Other commands

Angular component scaffolding

Note: You need to run commands from src/AspNetCoreSpa.Web/ClientApp directory: More information here

Angular tests - Using Jest and Angular jest preset

cd src/AspNetCoreSpa.Web/ClientApp

npm test

Compodoc Angular documentation

  • Steps to generate:
    • npm i compodoc -g
    • cd src/AspNetCoreSpa.Web/ClientApp
    • npm run compodoc
    • cd documentation
    • http-server

Compodoc documentation: alt text

### run end-to-end tests
```bash
# make sure you have your server running in another terminal (i.e run "dotnet run" command)
npm run e2e

run Protractor's elementExplorer (for end-to-end)

npm run webdriver:start
# in another terminal
npm run e2e:live

Azure Deploy

  • You can set an environment variable for azure app deployment password Set-Item -path env:AzureAppPass -value passwordhere
From powershell:
./deploy-azure.ps1

Deploy to heroku using its container service

Replace your app name where it is aspnetcorespa

  • dotnet publish -c release
  • docker build -t aspnetcorespa ./bin/release/netcoreapp2.2/publish
  • heroku login
  • heroku container:login
  • docker tag aspnetcorespa registry.heroku.com/aspnetcorespa/web
  • docker push registry.heroku.com/aspnetcorespa/web Note: There is a deploy.heroku.ps1 script included with this project which automates above steps.

Deploy to Azure as App Service

Set-Item -path env:AzureAppPass -value passwordhere

From powershell:
./deploy-azure.ps1

paypal

aspnetcorespa's People

Contributors

asadsahi avatar chris-house avatar fullstack-pro avatar kmiskiewicz avatar hampzter avatar lecksc avatar heightpi avatar razzeee avatar trojaner avatar slang123 avatar martinoss avatar

Watchers

James Cloos 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.