It’s time to release your latest front-end changes to production. However, as you create a new tag, you notice a large number of commits unrelated to the feature you’ve been working on. Now, instead of simply kicking off your deployment and watching the pipeline run, you need to check with numerous developers and managers to ensure you don’t deploy any …
Learn Svelte by Making a Word Puzzle: Part 2, Reactivity
So far in this multi-part series, we’ve used Svelte to make the frontend of a Word Puzzle Game, but it does not receive user input, yet. That doesn’t make for a very fun game!
In Part 2 of this series, we’re going to make our game a little more functional. We’ll accomplish the following tasks: (1) allow users to guess a word, (2) manage state for the guesses, and (3) track the correctness of each letter in each guess.
By the end of this post, we will be one step closer to having a Svelte-based, fully functional Word Puzzle Game! Without further ado, let’s get started.
JSON Server to Mock API Servers: A Quick and Easy Solution
I have found myself in the following scenario many times throughout my career. Everyone is ready to get the project started. You know what you are going to be working on, and as the frontend developer, you get started right away. You get to the point that you are ready to test your code to see how the API calls work. There’s one major thing in your way, though. The APIs aren’t done yet.
You could just create some static JSON files and read them in, but that doesn’t really test out calling an API. That’s where JSON Server swoops in to save the day. In this post, I’ll walk through how to use JSON Server. We’ll set up our environment, serve a simple JSON file, and generate mock data.
Mock RESTful Servers Fast With JSON Server
As a frontend developer, have you ever found yourself in a situation where the backend didn’t have a RESTful API that you could call to test out your user interface? Have you ever wanted to prototype an idea and found yourself getting down in the weeds setting up RESTful routes in a mock backend server?
That’s where json-server comes to the rescue!
With json-server, you simply create a JSON file that follows json-server’s conventions, and you can have a mock RESTful server up in no time. This blog post will go over the features of json-server that I have found most useful as a frontend developer.