Coder Social home page Coder Social logo

angular-folder-structure's Introduction

Highly Scalable Angular Folder Structure

The project is inspired by an article I wrote on Medium called How to define a highly scalable folder structure for your Angular project. The project is based on best practices from the community, other github Angular projects and my own experiences from working on several Angular projects.

login screen screenshot

Prerequisites

Before serving the project, you need to have Node version 8.9 and npm 5.5.1 or higher on your system. You can download the latest version of Node for your operating system on Node's official site.

If you already have Node and npm installed, verify their version by running:


$ node -v # => displays the node version
$ npm -v # => displays npm version

Once you have Node installed, you can use the npm command to install TypeScript:

$ npm install -g typescript

You don’t technically need TypeScript, but it’s highly recommended by the Angular team, so I recommend you install it to make working with Angular as comfortable as possible.

Now that you have Node, npm and TypeScript installed, you can install the angular cli by running:

$ npm install -g @angular/cli

Installing

You can install the projects dependencies by running

$ npm install

Json Server

We've used the JSON Server to create mock up a fake backend for this project. You will need to launch this server, to interact with the different API endpoint. This can be done by running npm run json:server.

Development server

Run npm run start for a dev server. The project will serve with the proxy a proxy flag by default. The proxy will highjack certain URLs, and send them to a specified backend server.

Scripts

npm start -> Run dev. server on http://localhost:4200/ npm run build -> Lint code and build app for production in dist folder npm run test -> Run unit tests via Karma in watch mode npm test:ci -> Lint code and run unit tests once for continuous integration npm run e2e -> Run e2e tests using Protractor npm run lint -> Lint code

License

The MIT License (MIT)

Copyright (c) 2018 Mathis Garberg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

angular-folder-structure's People

Contributors

pi-mathis avatar mathisgarberg avatar royrakesh avatar

Watchers

Luis Palma 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.