Skip to content

sudhakar-jonnakuti/angular-mock-jsonserver

Repository files navigation

angular-mock-jsonserver

Output:

Start JsonServer:-

C:\git-repo\git-angular\angular-mock-jsonserver> npm run mock:server

> [email protected] mock:server
> nodemon

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): server\**\*
[nodemon] watching extensions: js
[nodemon] starting `npm run server:generator && npm run server:json-server`

> [email protected] server:generator
> node server/json-generator.js


> [email protected] server:json-server
> node server/json-server.js

JSON Server is running

Start Client:-

C:\git-repo\git-angular\angular-mock-jsonserver> npm run start:dev

> [email protected] start:dev
> ng serve --configuration development  

✔ Browser application bundle generation complete.

Angular Live Development Server is listening on localhost:4200, 
open your browser on http://localhost:4200/

Reference

1. How to Set Up a Mock Backend with Angular 13 Applications
https://medium.com/geekculture/setting-up-a-mock-backend-with-angular-13-applications-26a21788f7da

2. How to create a Mock Server using Faker.js and JSON server
https://itnext.io/how-to-generate-mock-data-using-faker-js-and-json-server-1d17007a08e4