Giter VIP home page Giter VIP logo

voluntar-web's Introduction

VoluntarWeb

This is a companion app for voluntar-backend

This project was generated with Angular CLI version 10.1.1.

Get started

Fork the repository. Clone forked repository

git clone [email protected]:your-username/voluntar-web.git
cd voluntar-web

Install dependencies

npm install

Development server

Run npx ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

In local development mode all requests that start with /api will be proxied to a deployed development backend server. See proxy.conf.json for more info. In production, proxy.conf.json is ignored, for more info read Deployment instructions

Code scaffolding

Run npx ng generate component component-name to generate a new component. You can also use npx ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run npx ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run npx ng test to execute the unit tests via Karma.

Running end-to-end tests

Run npx ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use npx ng help or go check out the Angular CLI README.

Deployment instructions

Modern applications have frontend and backend deployed separately. This project is using Netlify for frontend deployment. Backend is deployed using other services.

For local development we have proxy.conf.json to proxy, in production we have to use proxy solution offered by deploy infrastructure, Netlify.

Why not call the backend directly?

We use proxy solution because backend server does not allow CORS. If server would allow CORS, we can get rid of all proxies and call server directly.

Netlify allows to create a _redirects file in the public resources folder, there you can indicate all redirects and rewrites. See Proxy to another service

Note:
_redirects file is dynamically generated and git ignored in this project

This project has multiple deploy environments like development and production, and _redirects content should be accordingly to deployed backend server.

Using Netlify there are 3 types of deployment. See Deploy contexts

  • production Branch prod is deployed
  • deploy-preview When someone opens a pull request
  • branch-deploy Branch dev is deployed

When one of this 3 contexts is happening, Netlify runs npm run ci:build that will generate _redirects before project build.

  • For production will proxy production backend server
  • For other two, development backend server will be used

Note:
Netlify can split some features by context, _redirects is still missing.
See Using different redirects across different contexts/environments

This project can be deployed in different ways. In the past multiple solutions were used like Docker, nginx or firebase. See commit when this instructions were added, to see what was deleted.

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.