Skip to content

ameksike/ksmf-skeleton-web-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Web App Skeleton

Template to create web application based on Angular, Angular Material and KsMf in an easy way. This project implements an example where three main entities are managed: Users, Tags and Comments.

Run production mode

  • npm run client:build
  • npm start

Run develop mode

  • npm run client:watch
  • npm run dev

Test

Run all test:

  • npm run

Run the tests separately:

  • npm run client:test
  • npm run server:test

Run a demo test that, given an array of URLs and a MAX_CONCURRENCY integer, implement a function that will asynchronously fetch each URL, not requesting more than MAX_CONCURRENCY URLs at the same time.

  • npx jest ./src/app/service/AsyncHandler.spec.js

Integration

This project depends on an external REST API service which provides all the data, therefore it works as an example of system integration.

+----------------+                       +-------------+
| Web App        |<--------------------->|  REST API   |
| Angular / KsMf |          HTTPS        |  KsMf       |
+----------------+                       +-------------+

To connect this application with the external service follow the steps below:

  • git clone https://github.com/ameksike/ksmf-skeleton-rest.git
  • cd ksmf-skeleton-rest
  • npm install
  • edit ./cfg/config.json and define database access options
  • npx sequelize-cli db:migrate
  • npx sequelize-cli db:seed:all
  • npm start
  • back to this project 'ksmf-skeleton-web-angular'
  • edit server\src\app\service\MyAPI.js constructor or create .env with MyAPI_URL and set http://localhost:3005 or the specific configuration for the external REST API in case the default options have been changed.

For more information see the following link: ksmf-skeleton-rest.

Screenshot

Project skeleton

- client 
|	+ build
|	+ public
|	+ src
|	- package.json
|	- README.md
- server	
|	+ bin/
|	|    - server.js
|	+ cfg/
|	|    - config.json
|	|    - core.json
|	+ src/
|	|    + app/
|	|    |    - index.js
|	|    + commnet/
| 	|    |    + controller/
|	|    |    |    - DefaultController.js
|	|    + user/
| 	|    |    + controller/
|	|    |    |    - DefaultController.js
- package.json
- .env
- .gitignore
- README.md

Client Development Steps

  • npm install -g @angular/cli
  • ng new client
  • cd client/
  • ng serve --open
  • ng generate component components/toolbar
  • ng generate service services/toolbar
  • ng generate module components/flight
  • ng generate component components/flight/components/list
  • ng generate service components/flight/services/flight
  • ng generate module components/comment
  • ng generate component components/comment/components/list
  • ng generate component components/comment/components/edit
  • ng generate component components/comment/components/show
  • ng generate component components/comment/components/layout
  • ng generate component components/comment/components/tags
  • ng generate service components/comment/services/comment
  • ng generate service components/comment/services/tag
  • ng generate service components/comment/services/user

About

Template to create Web application based on Angular easily.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors