I've used ReactJs with some libraries for front-end and created a fake server to mock an API.
Instructions follows:
Just to make it simpler to mock an API, I've used json-server
.
Install JSON Server:
npm install -g json-server
To start the server, just run:
json-server --watch server/db.json --port 3004
Using port 3004 to avoid conflicts with the application itself.
Now if you go to http://localhost:3004/db, you'll get the full database (JSON formatted)
First of all, use yarn
or npm install
to install all dependencies
In the project directory, you can run:
'*' *I prefer using yarn*
Runs the app.
Open http://localhost:3000 to view it in the browser.