Code Monkey home page Code Monkey logo

core's Introduction

ThinkAgro metrics - Core project

Master: Build Status

Staging: Build Status

This project is divided into two subprojects, both contained in the same repo, namely, a .NET Core 2.1 application and an Angular Project.

.NET Core 2.1

In the former version we used .NET Core 2, but lately there is a patch to support the latest features, which is poorly documented. (thanks to @Vreyesm for noticing this). In order to make your environment fully compilant with this version, you need to do the following:

dotnet new -i "Microsoft.AspNetCore.SpaTemplates::*" # This installs single page application project templates, version 2.1

For more info, you can check this page.

.NET controllers are unaffected by this change, so don't worry.

How to run this project

Prerequisites

  • Node.js โ‰ฅ v8.9.0 + npm
  • .NET Core 2

Install .NET Core. In some operating systems as OSX and Linux is also needed to install separatedly a node environment. It doesn't matter which version you use, as long as is 8+.

For Windows users, there is no problem as VisualStudio installs all the dependencies on the machine. For VSCode users, it applies the same of the above.

Run on OSX - Linux hosts

export ASPNETCORE_Environment=Development
dotnet run

As an alternate way to run, you can embed the enviroment variables on the same command, as exporting env is not recommended.

ASPNETCORE_Environment=Development dotnet run

Run - Windows command line

setx ASPNETCORE_Environment "Development"
dotnet run

Angular 5

The contents of the former Angular4 project has been migrated to Angular5, due to many problems from the dev team. This migration enables to fully use all the native tools designed to work on Angular 5 without the need of any hacks.

Before anything

This version of the template has the node_modules folder in the ClientApp subdirectory, so, now you will need to execute npm install inside of the ClientApp folder rather than at the root level of the project.

#example
cd ClientApp
npm install

How to build the project

You have two ways to build the project.

Build the production version

Use this method when preparing to ship code. This forces AoT on all components, hence revealing runtime errors before they go into production. Also, this way is also used by Travis to check if the project is correctly built. ng build --prod

Build the development version

Use this method when developing and you want absolute control over the angular project for debugging effects. ng serve

How to create new components

In the previous version, a patch was needed in order to make the @angular/cli tool to create components. In the 2.1 version of the template, angular projects have native support for those tools. To use them, you need to navigate to the folder ClientApp and then run the desired commands in there.

core's People

Contributors

alandenilisboa avatar alisboa13 avatar dpavez14 avatar feherrera avatar gurojas avatar icorrearojas avatar juanignacioc avatar katyfuentes avatar patricioesteban07 avatar rocker2503 avatar suflo avatar vreyesm avatar wuatu avatar xzerling avatar

Watchers

 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.