Fake api with data to test my user interface in angularjs [closed] - angularjs

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am building a user interface in angularjs and I want to test my api signature on some remote server that responds according to the signature.
For example GET request api/DocumentType/GetAll returns a json that I know the format and use .
I have created apis with POSTMAN chrome tool but it test the api not the client.
But me i dont care about the api.I want to test my client for the specific api with specified signature.
So is there any tool that I can create the api format, response and the data to fech so that I can test my UI.
I have also tested json placeholder but it does not support api creation and data hosting. most of all i need the free one

You can use Angular ApiMock to fake an API and focus on the UI code. It works by having a static JSON file in a URL that matches your API somewhat, and then setting a ?apimock=true query on your browser or on individual $http calls so you can easily flip between the real API and mock on any environment.
Check the demo page first without the flag and then with the flag.
(Full disclosure: I'm one of the creators of this library)
Edit: This works well with the other answer because you can reuse the static JSON file for Karma or other test runners.

Try karma + jasmine for front end testing using $httpbackend.

Atmo could be an ideal solution for your requirement.

Related

What are the backend service for flutter? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
I am confused in choosing database service for my flutter application. I started using firebase but as it is based on NoSQL , But if i am getting the need for rows and columns for my data which backend service should i use!.
As you mentioned you want to user Rows and Columns but want a service like Firebase. Well, here's a SQL alternative to Firebase.
Supabase
Typical SQL DB and works just like Firebase. Below is official docs of Flutter and Supabase which you can use to get started :)
Flutter x Supabase Docs
Cheers!
I think it depends on how you want to access the data. If you're wanting to stream and push notifications, I would stick with Firebase. If you just need to get and post data, focus more on api implementation. With a solid rest api, you can change up your database/backend all you want and just have to update the api, not your app.
I, personally, suggest searching around for data modeling techniques in Firebase. Check out the Fireship channel on youtube. In his channel's videos, search for modeling and you'll find a ton of info on Firebase data modeling. Many will reference Angular, but the techniques are the same.

Can we integrate kafka with react native [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
How to integrate kafka with react native for chat and real time tracking of a client.
and is it possible to implement or i want to use socket io for it give me a solution
A quick solution would be to put the Kafka cluster behind a simple REST API. Using a library like kafka-rest could be an easy way to connect your React Native app using the built in fetch function. You could go a step further and try to integrate the kafka-rest-node client into your React Native app; a cursory overview of the repo doesn't lead to any core Node dependencies.
Another method, one which would allow for "live" updates, might consist of putting Kafka behind a web server that converts the Kafka stream into a WebSocket connection. Libraries such as kafka-websocket allow clients to both consume and produce, whereas a more simple library like Microsoft's kafka-proxy-ws only allows for consuming messages.
It's worth noting that mobile clients don't always work well with streaming data, and you'd be advised to test your WebSocket-based implementation on a variety of uncertain network conditions (latency, dropped signals, etc).

Angulas 1 & Angular 2 - Hide api calls...possible? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I think I know the answer, but I'd like more opinions.
Imagine a scenario...
You create a new website using angular 1 or 2 where basically your front end application consumes services from a server that's send you results in json - The trivial scenario.
Then a competitor decide to create one web site to compete with yours. It's pretty easy to open Developers Tools on the browser and check the address of the rest server including api parameters. So, the competitor decides to create a migration tool to make easy for people to abandon your web site and adopt the competitor web site.
CORS cannot protect you because it's much more a browser feature - also you can use JSONp to consume api of different domains.
So, the question: Is there any solution for a scenario like this ?
You can obfuscate your API, but you can't hide the calls that are made to it.
There's a single good reason for this : the browser of the final user needs to know what requests to make, and make them.
Even if you found some way to hide the requests made from the Developper Tools, someone could still retrieve them by listening for them on the network.
However as I said, you can still obfuscate your API so that trying to replicate it would require non-trivial work. That way, an understandable request like
GET /user/id1234/profile?history=true
could become the less talkative
GET /1/id1234/p?x=1

Building front-end using Angular for someone else to build back-end later [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm thinking about building front-end of my web application with Angular for someone else to build the back-end of it later using Django or ME(A)N or something else. I know building front-end with HTML, CSS and javascript and handing it over to back-end engineer works, but I'm not sure about Angular and I'd like to be cautious. Is this a good idea, or would it be preferred that both front-end and back-end be developed simultaneously? And does it matter whether backend is Django or ME(A)N or else?
If this is not in line with Stack Overflow policy, please do me the favor of answering before closing it.
You can develop your front-end independently with no concerns about how it will be implemented.
You can use Karma and Jasmine to unit test your Front-End code by mocking your API calls with fake responses or fake logic, and you can use Protractor to run End-to-End tests on your Front-End code, again mocking the backend with fake placeholder logic.
As long as you expose certain API to communicate with the front-end, it does not matter which one you implement from a Front-End point of view.

Service to convert video to gif via api [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I've been using Zencoder's api to convert videos from one format to another but I now need to convert a video to an animated gif which is not included in the output formats on Zencoder.
Anyone know of a service which is able to do this, or alternatively any relatively simple backend library ideally php based which could do this?
I think due to the difficulty of making such a web service (API) work efficiently at scale there are very few providers offering the functionality of automating Video to GIF conversion via a REST API.
However, I found myself in a similar situation recently, did some research and came across two API products that might do the job for you:
giflayer API
This one's a REST API dedicated to converting videos to GIF animations. It works for both video URLs to portals like YouTube, and direct video links like http://website.com/video.mp4.
Here's how you make an API request:
https://apilayer.net/api/capture
? access_key = YOUR_ACCESS_KEY
& url = https://www.youtube.com/watch?v=3W6hZR29l5o
& start = 170
& duration = 1.5
Then, after a few seconds the API directly returns your GIF animation according to the parameters supplied in the request:
That's that, now there's also a second service that might fit the requirements stated above:
gfycat While they don't create actual GIFs, they supplement them by converting to HTML5 video, which is more lightweight in size. Just including this link if you're not yet sure whether it's actual GIF conversion you need.
Hope I could help.

Resources