mehrandvd
mehrandvd

Reputation: 9116

Bootstrapping Aurelia

Finally, I start to work with Aurelia. There is a starter kit available Here which facilitates initializing Aurelia. But it is a template which should be used within a Web Site template.

I have a pre-configured WebApi project and I want to use Aurelia in it. I've just added the starter kit files and folders to my project. But unfortunately it shows 27651 errors fo files in jspm_packages.

What am I doing wrong? Is there any Nuget bootstrapper for Aurelia available?

Upvotes: 4

Views: 720

Answers (4)

4imble
4imble

Reputation: 14426

For all of my projects using Aurelia, I use the aurelia-cli which you get through npm and I would also recommend this approach.

You can be up and running with hello world in under 5 minutes. You will then be able to build all the appropriate bits and pieces to talk to your api.

http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli/1

Upvotes: 0

Eric Bishard
Eric Bishard

Reputation: 5341

Well you asked what the errors are from. First thing is that you should exclude the jspm_packages folder from VisualStudios solution explorer Right click on it and mark 'exclude from project'.

Next, setup your project on source control (git) if not already and add the following to your git .ignore file

jspm_packages/
node_modules/`

I would suggest creating a second project aside from your WebAPI project that can contain static html, css and js files and do your Aurelia application there separate from your Web API project but in the same solution.

I could possibly give you a solution that is already setup, that shows how to use web api along with aurelia. But it would take some time for me to setup.

Upvotes: 0

Darxtar
Darxtar

Reputation: 2112

If you are using Web API, starting from an MVC5 project might be faster.

The following link is an Aurelia starter kit with MVC5.

You will have to update it to the latest version of Aurelia, but I managed to make it work with web api 2 and oAuth authentication.

https://github.com/rmourato/Mvc5-Aurelia

A tutorial can be found here.

http://ruimourato.com/2016/01/26/running-aurelia-on-mvc5.html

Hope this helps.

Upvotes: 0

Greg Gum
Greg Gum

Reputation: 38149

Start with the aspnetcore template from Here

You can use web api from the template.

You will be up and running in minutes.

Upvotes: 3

Related Questions