Home

Awesome

ASP.NET Core / Vue.js SPA Template App

This app is a template application using ASP.NET Core for a REST/JSON API server and Vue.js for a web client.

Overview of Stack

Setup

  1. Install the following:
  2. Run npm install && npm start
  3. Open browser and navigate to http://localhost:5000.

Scripts

npm install

When first cloning the repo or adding new dependencies, run this command. This will:

npm start

To start the app for development, run this command. This will:

npm run migrate

After making changes to Entity Framework models in api/Models/, run this command to generate and run a migration on the database. A timestamp will be used for the migration name.

npm test

This will run the xUnit tests in api.test/ and the Vue.js tests in client-web.test/.

npm run provision:prod

Before running this script, you need to create an ops/hosts file first. See the ops README for instructions.

This will run the ops/provision.yml Ansible playbook and provision hosts in ops/hosts inventory file. This prepares the hosts to recieve deployments by doing the following:

npm run deploy:prod

Before running this script, you need to create a ops/hosts file first. See the ops README for instructions.

This script will:

Development Email Delivery

This template includes a MailCatcher Docker image so that when email is sent during development (i.e. new user registration), it can be viewed in the MailCacher web interface at http://localhost:1080/.

Visual Studio Code config

This project has Visual Studio Code tasks and debugger launch config located in .vscode/.

Tasks

Debug Launcher

With the following debugger launch configs, you can set breakpoints in api/ or the the Mocha tests in client-web.test/ and have full debugging support.

Credit

The following resources were helpful in setting up this template: