Giter Site home page Giter Site logo

dreamzdevelopment / aspnetcore2angular5 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 16.8 MB

Asp.Net Core 2+ & Angular (5+) multi apps supported, Webpack full featured application

License: MIT License

C# 1.41% HTML 0.53% CSS 1.32% TypeScript 0.25% JavaScript 96.46% Shell 0.01% CoffeeScript 0.03%
aspnet-core angular5 sqlserver sqlite typescript sass webpack angularjs aspnetcorespa signalr signalr-core aspnetcore-prerendering aspnercore

aspnetcore2angular5's Introduction

AspNet Core 2+ Angular Core 5+

Asp.Net Core 2+ & Angular (5+) multi apps supported, Webpack full featured application, integrate Angular Core 5.0+ app with AspNet Core Server Pre-rendering.

Aspnet Core Server Pre-rendering

Repository to Workspace

[Note: You must set Required Section of 'app.settings.production.json', to the dotnet User-Secrets, see ## User Secrets ]
[Note: You must set Required Section of 'app.settings.production.json', to the dotnet User-Secrets, see ## User Secrets ]
[Note: You must set Required Section of 'app.settings.production.json', to the dotnet User-Secrets, see ## User Secrets ]

- dotnet restore
- npm install
- npm run npm-libraries
- npm shrinkwrap [ optional ]

Migration settings

In app.settings.json, there are 3 settings in 'MigrateAndSample' section, configure as you need

Database Migration

For creating Main database [ SQL Server | SQLite ], which is also (Identity | User) Database
- dotnet ef migrations add Initial -c SQLServerContext

For Creating Secondary database [SQLite | any relational database] , which is used for non secured data, such as Images and
 Media, Site Navigation Menus
- dotnet ef migrations add Initial -c SQLiteContext -o Migrations/Sqlite

[Note: Applying migrations and calling sample data injection, is automatic. When app runs with 'dotnet run' ]
[PS: see settings in 'app.settings.json' ]

Database settings

Database selection

In app.settings.json, there are 2 settings in 'Database' section,
configure as you need.

Database connection

In app.settings.json, there are connection strings and database names in 'ConnectionStrings' section,
configure as you need.

User Secrets

This app is using dotnet user-secrets service, to save and use User Related information,
such infos are Admin [UserName, Password, Role, Email ] etc.
And, for DatabaseAdmin[UserName, Password] etc.

Set these settings in User-Secrets by using the commented lines in 'app.settings.production.json'.

Localization [SQL Server | SQLite], any Relational Database

This app contains, SQL Localization, inspired by Damien Bod's - https://damienbod.com/,
AspNetCore Localization project.

The local version is with few major customization-
Learn more at
- [DreamzDev.Localization.Sql](https://www.nuget.org/packages/DreamzDev.Localization.Sql/)
- [this repo](https://github.com/DreamzDevelopment/Localization)

[Must execute following commands ]
[Must execute following commands ]
[Must execute following commands ]
    - dotnet ef migrations add Initial -c LocalizationModelContext -o Migrations/Localization
    - dotnet ef database update -c LocalizationModelContext

Run app in development mode

- dotnet run

Run in Production mode | Publish App

- Comment 'UseEnvironment' in 'Program.cs'

- dotnet run

Publish APP

[Note: must comment the line in 'Program.cs' - 'UseEnvironments('Development')' ]

- npm run dotnet-publish

To run application from published folder
- dotnet AspNetCore2Angular5.dll

To publish to hosting server, you choose your preferred method and host and follow their instructions

Thanks

Damien Bod, Asadsahi, MarkPieszak and many more open source community superstars

[ ]

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.