Demo runs here : https://taskmanager2020.azurewebsites.net/
- Using
@ngrx/store
for state management and@ngrx/effects
the RxJS powered side effect model for store. - Using
@ngrx/entity
to Reduce boilerplate for creating reducers that manage a collection of models. - Using
@ngx-translate/core
for the internationalization - Using
rxjs
for reactive programming. - Using
json-server
for REST API. - Using
@angular/flex-layout
for UI layout. - Using
@angular/material
for the UI component. - Using
@angular/animations
for the animations. - Using
karma
for Unit testing.
- Using
@angular/cli
for command-line interface - Using
concurrently
to run multiple commandsjson-server
ng serve
concurrently
- fork the project
- git clone projectn
cd to the project folder
npm install
npm start
to 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:ssr
start SSR version (Server Side Rendering)ng build --prod
to 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.