Demo runs here : https://taskmanager2020.azurewebsites.net/
- Using
@ngrx/storefor state management and@ngrx/effectsthe RxJS powered side effect model for store. - Using
@ngrx/entityto Reduce boilerplate for creating reducers that manage a collection of models. - Using
@ngx-translate/corefor the internationalization - Using
rxjsfor reactive programming. - Using
json-serverfor REST API. - Using
@angular/flex-layoutfor UI layout. - Using
@angular/materialfor the UI component. - Using
@angular/animationsfor the animations. - Using
karmafor Unit testing.
- Using
@angular/clifor command-line interface - Using
concurrentlyto run multiple commandsjson-serverng serveconcurrently
- fork the project
- git clone projectn
cd to the project foldernpm installnpm startto start the front-end project and json-server ,then visithttp://localhost:8000(If run at local using json-server,please change the BASE_CONFIG tohttp://localhost:3002)npm run start:ssrstart SSR version (Server Side Rendering)ng build --prodto build- if deploy to Azure,need to add the Web.config to read the
en.json. pls referhttps://docs.microsoft.com/en-us/archive/blogs/africaapps/how-to-serve-static-json-files-from-a-windows-azure-website
-
Open your browser and go to App Service Editor
(https://<your-app-name>.scm.azurewebsites.net/dev/wwwroot/) -
Run the command in the Console (Ctrl+Shift+C)
npm install json-server --save-dev -
Put all file/folder (db.json and public folder) into wwwroot folder
-
Create a server.js with the following content
const jsonServer = require('json-server')
const server = jsonServer.create()
const router = jsonServer.router('db.json')
const middlewares = jsonServer.defaults()
server.use(middlewares)
server.use(router)
server.listen(process.env.PORT, () => {
console.log('JSON Server is running')
})
- Click Run (Ctrl+F5), this will generate web.config file automatically and open your website in the browser.