<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: anderspk</title>
    <description>The latest articles on DEV Community by anderspk (@anderspk).</description>
    <link>https://dev.to/anderspk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F282340%2F34e978ef-910f-47c5-8529-45f302e329e8.jpeg</url>
      <title>DEV Community: anderspk</title>
      <link>https://dev.to/anderspk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anderspk"/>
    <language>en</language>
    <item>
      <title>Create a basic CRUD api and fill it with dummy data in SECONDS</title>
      <dc:creator>anderspk</dc:creator>
      <pubDate>Wed, 29 Jan 2020 17:23:34 +0000</pubDate>
      <link>https://dev.to/anderspk/create-a-basic-crud-api-and-fill-it-with-dummy-data-in-seconds-dp9</link>
      <guid>https://dev.to/anderspk/create-a-basic-crud-api-and-fill-it-with-dummy-data-in-seconds-dp9</guid>
      <description>&lt;p&gt;A few months ago, I released a free service to help with the need for dummy data and a CRUD api during frontend development -- and I'd like to share it with you today!😄&lt;/p&gt;

&lt;h2&gt;Who is this for?&lt;/h2&gt;

&lt;p&gt;This is for YOU when you're focused on the frontend, and don't want to hardcode dummy data to use in your app; you want to make an api call, you want lots of data, you want to be able to modify the shape of the data as you go along and find more requirements, and you might want to to make CRUD actions on the data.&lt;/p&gt;

&lt;h2&gt;Start your timer...&lt;/h2&gt;

&lt;p&gt;There's not much to it, so let's just jump straight in!&lt;/p&gt;

&lt;h3&gt;Step 1: Navigate to the website&lt;/h3&gt;

&lt;p&gt;Head on over to &lt;a href="https://crudpi.io" rel="noopener noreferrer"&gt;Crudpi.io&lt;/a&gt; and you'll be greeted by this screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0zwuiguhqunitnccdo54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0zwuiguhqunitnccdo54.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Step 2: Create your first CRUD API&lt;/h3&gt;

&lt;p&gt;No time to waste! Just type in an appropriate name, and hit CREATE!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffem2owz1ncg20xvtzvdv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffem2owz1ncg20xvtzvdv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;And you're done!&lt;/h3&gt;

&lt;p&gt;You can now go right ahead and start using the provided links to GET, POST, UPDATE, and DELETE your data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyo2fq9k9kyohq0tr4wul.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyo2fq9k9kyohq0tr4wul.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;But wait! There's more!&lt;/h1&gt;

&lt;p&gt;We need dummy data! Lots of it!&lt;/p&gt;

&lt;h3&gt;Step 3: Fill your api with dummy data&lt;/h3&gt;

&lt;p&gt;When you click JSON Inserter, you'll get access to a code editor where you can define a JSON object that you want inserted into your API. The cool part is that the editor has a built-in &lt;a href="https://www.npmjs.com/package/faker" rel="noopener noreferrer"&gt;faker&lt;/a&gt; dummy data generator, and intelliSense to suggest dummy data, so you don't need to hard-code the values. Couple this with the ability to choose how many copies of the object you want inserted into your API, and you can quickly have 100 custom defined dummy data objects at your disposal in no time!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1a6x15v3i2uesblq14pz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1a6x15v3i2uesblq14pz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've defined the object I want above. As you can see, "name", "address", and "logo", will be replaced with generated fake values, while "planet" is hardcoded as "Earth". I want 50 of these in my API.&lt;/p&gt;

&lt;h3&gt; And just like that...&lt;/h3&gt;

&lt;p&gt;My frontend now has access to exactly the data I need! I can also add more API's on the same page, and quickly delete/replace the saved data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg7o1e2hlxtq0z5g1kcdi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg7o1e2hlxtq0z5g1kcdi.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;Thanks for reading! 😀😀 &lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
