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.
- npm run client:build
- npm start
- npm run client:watch
- npm run dev
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
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.jsconstructor or create.envwith 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.
- 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
- 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
