UI developer tutorials and guides

Showing posts with label JSON. Show all posts
Showing posts with label JSON. Show all posts

Tuesday, June 14, 2022

Ceate a mock API using Github and Mockend

It's wise to establish a backed setup first, so that UI developers can test the data. So UI team has to wait for the later to complete job. 

The activation for single repo work only once, switching between repo will not work, it may cause to expire the mockend plan.

Mocking data is a great in such situations is a must. How to create mock API with custom data? 

So how do we create our own mock data with out a server?

We can create a REST and Graphql API using mockend.com and Github repository. For free usage only one repository can be activated.



In the Repository we have to setup the mock JSON file. (.mockend.json)

"User": {
"title": { "string": {} }
}
}

The title will be automatically generated for us. For advance use case we can use custom values and lorem strings.

Then the API can be read using any API client such as POSTMAN or Insomnia. The Graphql is worked for me using the Apollo Studio 

REST API URL:  mockend.com/org/repo/post

Replace the org with organization / user-name and repo with repository name.

The Graphql API URL will be  

mockend.com/org/repo/graphql

 

 

 


Read More

How to create global variable in vitejs [Solidjs]

 Vitejs is build tool for modern nodejs applications. Global variable requires in any application where common information need to be accessed in different modules. 

It is common practice is that store values such as URL, KEYS in separate files, in such cases we can use either environment variable or project level symbols.

Read More