神刀安全网

Cross-platform web development with ASP.NET Core, Node.js and Webpack

ASP.NET Core Starter Kit

ASP.NET Core Starter Kit is an opinionated boilerplate for web development based on .NET Core , GraphQL and React .

Features

✓ Component-based front-end development with Webpack ,CSS Modules and React (see tools/webpack.config.js )

✓ Modern JavaScript syntax ( ES2015 +) via Babel ; modern CSS syntax (CSS3+) viaPostCSS

✓ Application state management via Redux (coming soon)

✓ Routing and navigation viaReact App,Universal Router andHistory npm modules

✓Code-splitting and async chunk loading with Webpack and ES6 System.import()

✓ Hot Module Replacement ( HMR ) /w React Hot Loader (coming soon)

✓ Cross-device testing with Browsersync (coming soon)

✓ Git-based deployment to Azure App Service (see tools/deploy.js )

✓ 24/7 community support on Gitter or StackOverflow ; customization requests on Codementor

Directory Layout

. ├── /.vscode/                   # Visual Studio Code settings ├── /build/                     # The folder for compiled output ├── /client/                    # Client-side app (frontend) ├── /client.test/               # Unit and integration tests for the frontend app ├── /public/                    # Static files such as favicon.ico etc. ├── /server/                    # Web server and data API (backend) ├── /server.test/               # Unit and integration tests for the backend app ├── /tools/                     # Build automation scripts and utilities │── jsconfig.json               # Visual Studio Code settings for JavaScript │── LICENSE.txt                 # Licensing information │── package.json                # The list of project dependencies and NPM scripts └── README.md                   # Project overview / getting started guide

Prerequisites

Getting Started

1 . Clone the latest version of ASP.NET Core Starter Kit on your local machine by running:

$ git clone -o aspnet-starter-kit -b master --single-branch /       https://github.com/kriasoft/aspnet-starter-kit.git MyApp $ cd MyApp

2 . Install project dependencies listed in project.json and package.json files by running:

$ dotnet restore                # Installs .NET dependencies listed in project.json $ npm install                   # Installs Node.js dependencies listed in package.json

3 . Finally, launch the web app by running:

$ npm start                     # Compiles and lanches the app

The app should become available at http://localhost:5000/

How to Deploy

Before you can deploy your app to Azure App Service , you need to open Web App settings in Azure Portal , go to "Deployment Source", select "Local Git Repository" and hit [OK]. Then copy and paste "Git clone URL" of your Web App into tools/deploy.js file. Then, whenever you need to compile your app into a distributable format and upload that to Windows Azure App Service, simply run:

$ npm run deploy                # Same as running: node tools/deploy --production

Related Projects

  • React Starter Kit — Isomorphic web app boilerplate (Node.js, Express, GraphQL, React)
  • Babel Starter Kit — JavaScript library boilerplate (ES2015+, Babel, Rollup)
  • React Static Boilerplate — Generate static websites from React components with Webpack
  • Universal Router — Isomorphic router for web and single-page applications (SPA)
  • Membership Database — SQL database boilerplate for web app users, roles and auth tokens

Get in Touch

License

Copyright © 2014-2016 Kriasoft . This source code is licensed under the MIT license found in theLICENSE.txt file. The documentation to the project is licensed under the CC BY-SA 4.0 license.

Made with ♥ by Konstantin Tarkus ( @koistya ) andcontributors

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Cross-platform web development with ASP.NET Core, Node.js and Webpack

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址