teleren/devto huggingface dataset:
JS interview in 2 minutes / pure vs impure functions
Tags: javascript, typescript, beginners, career
Published: 2021-05-21 11:40:55

---
title: JS interview in 2 minutes / pure vs impure functions
published: true
description: Let's try to figure out how to answer common JS questions in an interview.
tags: javascript, typescript, beginners, career
cover_image: https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Unofficial_JavaScript_logo_2.svg/1920px-Unofficial_JavaScript_logo_2.svg.png
---

**Question:**
Explain the difference between pure and impure functions. What are the side effects?

**Quick answer:**
A pure function is a function that returns the same result for the same arguments, also this function doesn't have any side effects.

The side-effect is then function modify any data outside of its current scope.

**Longer answer:**
We can start with side effects, basically, this means that if you have some environment and you run a function with a side effect, something will be changed by this function in this environment.

Possible examples are -  writing to file, displaying something to the user, making HTTP requests, modifying global variables, emitting events, ...

As for repeatable results, it is simpler to just give an example.

```javascript
let add = (a, b) => a + b;
let mult = (a, b) => a * b;
let getProp = (name) => (obj) => obj[name]
```

All these functions are repeatable because they are providing the same result over the same arguments.

Btw there are no side effects -> they are pure ✨

**Real-life applications:**
Pure functions significantly simplify testing and debugging, also helps to reuse code easier.

If you don't depend on the environment it will be ridiculously easy to write tests. 

Same for reusability, everyone should prefer just using something over setting the environment -> using something -> cleaning the environment.

Can you spot the issue here? 🔎

```javascript
let headers = [
  ... // some regular headers
]

function getAuthData() {
  // ...
  headers.push({ Authorization: token })
  return http.get('/data', headers)
}

function externalService() {
  return http.get('http://other.service/api', headers)
}

let data1 = getAuthData()
let data2 = externalService()
```

**Resources:**
[wiki/pure_functinos](https://en.wikipedia.org/wiki/Pure_function)
[wiki/side_effect](https://en.wikipedia.org/wiki/Side_effect_(computer_science))


**Other posts:**
* [JS interview in 2 minutes / Closure](https://dev.to/kozlovzxc/js-interview-in-2-minutes-closure-3hi6)
* [JS interview in 2 minutes / Currying 🥘](https://dev.to/kozlovzxc/js-interview-in-2-minutes-currying-2hko)
* [JS interview in 2 minutes / Promise
](https://dev.to/kozlovzxc/js-interview-in-2-minutes-promise-4fhl)

---

Btw, I will post more fun stuff here and on [Twitter](https://twitter.com/kozlovzxc). Let's be friends 👋
run ping command as normal user in wsl2
Tags: wsl2
Published: 2021-05-21 11:38:29

run `getcap /bin/ping` on a normal linux distribution,

$ getcap /bin/ping
/bin/ping = cap_net_raw+ep


change capability on the /bin/ping of wsl2

```
setcap cap_net_raw+ep /bin/ping
```
From Ghost Blog to Static Site
Tags: ghost, staticsite, podman, containers
Published: 2021-05-21 11:07:16

I've always liked the Ghost Blogging platform since it was released years ago. I like it's editor, CMS, among other things. However, I don't like that I can't host it as a static site (SS). I want to be able to use the like of Netlify, Github/Gitlab pages or any other static hosting provider. I started googling and found Ned's [blog post](https://www.nedmcclain.com/static-ghost-site/). He explained his requirements which was exactly what I was looking for. He didn't explain everything, but did a good job at the overview, and so I did some of my own edits.

Note: SS version of ghost does remove some features, so check Ned's list to make sure you don't need them. I didn't because I was going for simple, and I mean really simple.

Basically the pipeline for doing a Static Site from Ghost is as follows

1.   Setup a local instance of Ghost (I'm using a container w/ `podman`
2.   Create the site per your wants
3.   Create a Static Site from the local ghost installation
4.   Host the static site (We'll go over using Github pages, but you could use anything else)

## Setting up local Ghost installation
I'm using podman so.... I can get up and running with one command....
```
podman run -d --name ghost -e url=https://localhost:8080 -p 8080:2368 ghost
```
Now I can point my browser to `https://localhost:8080`

## Creating your site
Checkout the Ghost docs to set up your site. I'm doing a simple blog using the Attila Theme, modified of course.

## Creating the static site
Now this is the bread and butter. There's a nifty npm package called `ghost-static-site-generator`

```
(sudo) npm install -g ghost-static-site-generator
```

That command will install a utility called `gssg`.

Now `gssg` will basically go to our local ghost installation and pull down a static version of the site.

## Hosting + Git
I'm using github, follow their [guide](https://pages.github.com/) to create a Github pages repo.

```
git clone <your_pages_repo>
```

** Edit the Settings for your repo to deploy the `/docs` folder from your repo
![settings](https://eli-xciv.github.io/content/images/2021/05/Screenshot_2021-05-20-Build-software-better--together.png)

Now we're going to get a static site into `/docs`.

```
gssg ---domain "https://localhost:8080" --url "https://eli-xciv.github.io" --dest docs
```

Now all you need to do is to commit and push the repo to Github and it will publish your static site.

```
git add . ; git commit -m "First commit of Ghost Static Site"; git push -u origin master
```

Voila! in a second or so, your static site is hosted on github.io!

***
## Extras
In my repo I've created a script under `bin/migrate.sh` that will run the migration, and commit it to github in on fell swoop. 

```
#!/bin/bash
printf -v date '%(%Y-%m-%d %H:%M:%S)T\n' -1

gssg ---domain "https://localhost:8080" --url "https://eli-xciv.github.io" --dest docs

git add .

git commit -m "Blog Update: $date"

git push
```
Debut of Cloud Managed ClickHouse On Alibaba Cloud
Tags: webdev, analytics, cloudnative, cloudskills
Published: 2021-05-21 09:56:53

ClickHouse, known as a good alternative for ES(Elasticsearch), is an open source database engine for real-time analysis. It can be used for web analysis, (behavior) log analysis, network analysis, crowd division, link monitoring and others.  

Especially, it does well in log analysis scenario even faster than Elasticsearch, and this is where we recommend you to use it.

A good news is that here we have cloud managed service of ClickHouse on Alibaba Cloud from this month, and you are allowed to explore this product for FREE.
[Learn More About ApsaraDB for ClickHouse >](https://www.alibabacloud.com/product/clickhouse)
[Apply Free Trial >](https://www.alibabacloud.com/product/clickhouse/free-trial)


【Best Practice】
1. [ClickHouse: A Business Weapon for Crowd Selection](https://www.alibabacloud.com/blog/clickhouse-a-business-weapon-for-crowd-selection_597725)
2. [Selecting a ClickHouse Table Engine](https://www.alibabacloud.com/blog/selecting-a-clickhouse-table-engine_597726)
3. [ClickHouse Kernel Analysis – Storage Structure and Query Acceleration of MergeTree](https://www.alibabacloud.com/blog/clickhouse-kernel-analysis-storage-structure-and-query-acceleration-of-mergetree_597727)
Configure Proxy credentials in docker-desktop windows?
Tags: tip, docker
Published: 2021-05-21 10:55:58

Open Docker Desktop Settings > Proxies > Set Manual proxy configuration

Put proxy details and give it a try
```
format: proxy:port
```

If this does not work. try this
```
format: domain\username:password@proxy:port
```

Please encode special characters in password at https://www.url-encode-decode.com

Make sure you add URLs which need to Bypass. Thanks
Bootstrap 4 Table + AngularJs + Kotlin SpringBoot RestAPI
Tags: springboot, angular, bootstrap, koltin
Published: 2021-05-21 10:48:59

https://grokonez.com/frontend/bootstrap/bootstrap-4-table-angularjs-kotlin-springboot-restapi

Bootstrap 4 Table + AngularJs + Kotlin SpringBoot RestAPI


In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you how to show data from <strong>Kotlin SpringBoot RestAPI</strong> on web-view by <strong>Bootstrap 4 Table</strong> and <strong>AngularJs</strong>.

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.6.1
– Spring Tool Suite – Version 3.9.0.RELEASE
– Bootstrap 4
– AngularJs
– Spring Boot – 1.5.9.RELEASE
– Kotlin
<h2>II. Goal</h2>
We create a <strong>Kotlin SpringBoot</strong> project that uses <strong>AngularJs Ajax</strong> to get data and styles web-view with <strong>BootStrap 4 Table</strong>, the project as below structure:

<img src="https://grokonez.com/wp-content/uploads/2017/12/Kotlin-SpringBoot-RestAPI-AngularJS-Bootstrap-4-Table-project-structure.png" alt="Kotlin SpringBoot RestAPI + AngularJS + Bootstrap 4 Table - project structure" width="387" height="308" class="alignnone size-full wp-image-9732" />

<strong>Run & check results</strong>
-> get message:

<img src="https://grokonez.com/wp-content/uploads/2017/12/Kotlin-SpringBoot-RestAPI-AngularJS-Bootstrap-4-Table-logs-request-headers.png" alt="Kotlin SpringBoot RestAPI + AngularJS + Bootstrap 4 Table - logs request headers" width="618" height="352" class="alignnone size-full wp-image-9733" />

<img src="https://grokonez.com/wp-content/uploads/2017/12/Kotlin-SpringBoot-RestAPI-AngularJS-Bootstrap-4-Table-logs-request-preview.png" alt="Kotlin SpringBoot RestAPI + AngularJS + Bootstrap 4 Table - logs request preview" width="677" height="299" class="alignnone size-full wp-image-9734" />

-> result:

<img src="https://grokonez.com/wp-content/uploads/2017/12/Kotlin-SpringBoot-RestAPI-AngularJS-Bootstrap-4-Table-results.png" alt="Kotlin SpringBoot RestAPI + AngularJS + Bootstrap 4 Table - results" width="675" height="386" class="alignnone size-full wp-image-9735" />
<h2>III. Practice</h2>
<strong>Step to do</strong>:
– Create Kotin SpringBoot project
– Create data models
– Implement Index view Controller
– Implement RestAPI
– Create index view
– Implement AngularJs Ajax script
<h3>1. Create Kotin SpringBoot project</h3>
Use <strong>SpringToolSuite</strong> to create <strong>SpringBoot</strong> project with <strong>Kotlin</strong> language, see dependencies as below:

More at:

https://grokonez.com/frontend/bootstrap/bootstrap-4-table-angularjs-kotlin-springboot-restapi

Bootstrap 4 Table + AngularJs + Kotlin SpringBoot RestAPI
N2 - The Next-Generation Blockchain Banking Platform

Tags: blockchain, cryptocurrency, n2coin, finance
Published: 2021-05-21 10:44:11

Here is an interesting blog on what N2 Coin (N2C) is and how its introduced the new-age solution to financial challenges called GloFi.

Read More >> https://camillemimiroux.medium.com/n2-the-next-generation-blockchain-banking-platform-479cfafca5da
Kotlin SpringBoot JQuery Ajax POST/GET requests
Tags: kotlin, springboot, jquery
Published: 2021-05-21 10:41:44

https://grokonez.com/spring-framework/spring-boot/kotlin-springboot-jquery-ajax-postget

Kotlin SpringBoot JQuery Ajax POST/GET requests

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you how to send/retrieve data objects by <strong>Kotlin SpringBoot JQuery Ajax POST/GET</strong> application.

Related posts:
- <a href="https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example">Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
- <a href="https://grokonez.com/java-integration/integrate-jquery-ajax-post-get-spring-boot-web-service">How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot</a>

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
– JQuery
– BootStrap
– Kotlin language
<h2>II. Pratice</h2>
In the tutorial, we create a <strong>Kotlin SpringBoot</strong> project as below:

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springboot-jquery-ajax-postget-project-structure.png" alt="kotlin springboot jquery ajax postget - project structure" width="367" height="346" class="alignnone size-full wp-image-7893" />

<strong>Step to do</strong>:
- Create Kotlin SpringBoot project
- Create data models
- Implement controllers
- Create index.html view
- Implement Jquery Ajax GET/POST requests
- Run and check results
<h3>1. Create Kotlin SpringBoot project</h3>
– Open <strong>Spring Tool Suite</strong>, on main menu, choose <strong>File</strong>-><strong>New</strong>-><strong>Spring Starter Project</strong>, add project info, 

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springboot-jquery-ajax-postget-create-project.png" alt="kotlin springboot jquery ajax postget - create project" width="458" height="410" class="alignnone size-full wp-image-7894" />

Then press <strong>Next</strong> for needed dependencies:
-> For Template Engines, choose Thymeleaf
-> For Web MVC, choose Web->Web

<img src="https://grokonez.com/wp-content/uploads/2017/09/kotlin-springboot-jquery-ajax-postget-add-dependencies.png" alt="kotlin springboot jquery ajax postget - add dependencies" width="685" height="164" class="alignnone size-full wp-image-7895" />

Open <strong>pom.xml</strong> file and check needed dependencies:

More at:

https://grokonez.com/spring-framework/spring-boot/kotlin-springboot-jquery-ajax-postget

Kotlin SpringBoot JQuery Ajax POST/GET requests
Salary and Jobs Opportunities after Adobe Certification 
Tags: adobecertification
Published: 2021-05-21 10:40:29

The IT market is constantly growing and requires digital media skills such as creating, managing, integration and communication. These skills can be demonstrated through Adobe video, drawing, web or design programs. If you are thinking of starting a career in graphic design, then you will easily get a certification in this adobe. The Adobe certification helps you gain skills and gain valuable professional credibility that demonstrates real design skills to potential clients and employers. Adobe provides certificates such as Photoshop, Illustrator, Flash, InDesign, and Dreamweaver that will serve your purpose.

Here is the list of jobs and their salaries offered to professional in this field:

1.	Creative Director: USD 91,000
2.	Art Director: USD 67,000
3.	Senior Graphic Designer: USD 62,000
4.	Video Producer: USD 52,000
5.	Film / Video Editor: USD 52,00
6.	Graphic Artist / Designer: USD 49,000
7.	Graphic Designer: USD 45,000

There are many job opportunities in this area, and Adobe certification will help you achieve them. JustCerts offers comprehensive <a href="https://www.justcerts.com/adobe-certification-exams.html">Adobe Certification Exams</a> practice questions that will help you prepare for these certification exams, so start studying today!
Your minimalistic full-text search cli helper. Librarian.
Tags: fts5, fulltextsearch, sqlite, snowball
Published: 2021-05-21 10:33:37

If you look for an cli utility to use full text search technique to find information in your text files or build micro services which provides smart searching and don't want to have a hassle with complicated software take a look at [Librarian](https://github.com/4l1fe/Librarian).

It's based on sqlite fts5 ability and allow to deal with different languages.

{% github 4l1fe/Librarian %}
Navbar built with TailwindCSS & AlpineJS
Tags: codepen, tailwindcss, alpinejs
Published: 2021-05-21 10:31:41

<p>Inspired from Github Readme Page. <a href="https://github.com/readme/caleb-porzio" target="_blank">https://github.com/readme/caleb-porzio</a></p>

{% codepen https://codepen.io/mithicher/pen/XWMpONp %}
Enlightment デスクトップ環境: Terminology で日本語入力
Tags: enlightment, ibus, terminology, japanese
Published: 2021-05-21 10:31:23


[Void Linux](https://voidlinux.org/) に興味を持って、デスクトップ環境をつくろうとした時のことです🙂
デスクトップ環境に [Enlightment](https://www.enlightenment.org/) を選択しました。初めて使いましたが、見た目の荘厳さに反して動作が軽快で驚きました。（ただしクセはあるように感じました。）
Void Linux 自体についても、[XBPS パッケージシステム](https://docs.voidlinux.org/xbps/index.html) に色々そろっていて、便利でした。ささいなお話ですが、`xbps-install` コマンドは、`pacman` や `apt` よりも入力しづらく感じました。笑 init システムに [`runit`](http://smarden.org/runit/) が使われています。

日本語入力環境として [iBus](https://github.com/ibus/ibus) + [mozc](https://github.com/google/mozc) を用意しました。環境変数 `GTK_IM_MODULE` / `XMODIFIERS` / `QT_IM_MODULE` の設定などを行いました。
しかしながらそれらを完了させた後でも、Enlightment 標準のターミナルである [Terminology](https://www.enlightenment.org/docs/apps/terminology.md) では、日本語を入力することができませんでした。他の Linux のように、[GTK](https://www.gtk.org/) や [QT](https://www.qt.io/) のアプリケーションへ対応させるだけでは、不十分のようです。

結果として、__`ECORE_IMF_MODULE`__ を設定することで解決できることがわかりました。

（参考） https://github.com/borisfaure/terminology

```console
$ nvim ~/.xprofile
```

以下のように環境変数を追加します。

```diff
  export GTK_IM_MODULE=ibus
  export XMODIFIERS=@im=ibus
  export QT_IM_MODULE=ibus
  ibus-daemon -drx
+ 
+ export ECORE_IMF_MODULE=ibus
```

以上です。

[Ecore](https://docs.enlightenment.org/api/ecore/doc/html) の IMF というのは、Input Method abstraction Framework のようです。（参考: [EFL](https://github.com/Enlightenment/efl)）

試してはいませんが、[Fcitx](https://fcitx-im.org/) を使う場合も、同様のはずです。
Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example
Tags: kotlin, restapi, getmapping, postmapping
Published: 2021-05-21 10:31:07

https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example

Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> shows you how to create <strong>Kotlin Spring MVC RequestMapping</strong> RESTful APIs with <code>@GetMapping</code>, <code>@PostMapping</code>, <code>@PutMapping</code>, <code>@DeleteMapping</code> using <strong><a href="https://grokonez.com/tag/spring-boot">SpringBoot</a></strong>.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-springjpa-many-many-relationship">Kotlin SpringJPA Many-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-spring-jpa-postgresql-spring-boot-example">Kotlin Spring JPA + Postgresql | Spring Boot Example</a>
- <a href="https://grokonez.com/spring-framework/spring-data/kotlin-springjpa-hibernate-one-many-relationship">Kotlin SpringJPA Hibernate One-To-Many relationship</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/spring-framework-4-3-new-feature-requestmapping-getmapping-postmapping-putmapping-deletemapping">Spring Framework 4.3 New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping</a>

<!--more-->
<iframe width="853" height="480" src="https://www.youtube.com/embed/OMxaQ-uKB-Y?rel=0" frameborder="0" allowfullscreen></iframe>
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
– Kotlin 1.1.4
- PostMan - Rest Client
<h2>II. @GetMapping, @PostMapping, @PutMapping, @DeleteMapping</h2>
- <code>@ org.springframework.web.bind.annotation.GetMapping</code>
<code>@GetMapping</code> acts as a shortcut for <code>@RequestMapping(method = RequestMethod.GET)</code>.

<pre><code class="language-kotlin">
@GetMapping("/")
fun getAll(): MutableMap<Long, Customer>{
	...
}
</code></pre>

- <code>@ org.springframework.web.bind.annotation.PostMapping</code>
<code>@PostMapping</code> acts as a shortcut for <code>@RequestMapping(method = RequestMethod.POST)</code>.

More at:

https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example

Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example
Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController
Tags: kotlin, springboot, restcontroller
Published: 2021-05-21 10:26:31

https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller

Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you the first step to build a SpringBoot Kotlin RESTful Web Service.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example">Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example</a>


More at:

https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller

Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController
Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController
Tags: kotlin, restcontroller, springboot, restful
Published: 2021-05-21 10:23:04

https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller

Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController

In the tutorial, <a href="https://grokonez.com">JavaSampleApproach</a> will show you the first step to build a SpringBoot Kotlin RESTful Web Service.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example">Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example</a>

<!--more-->
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
- SpringBoot - 1.5.6.RELEASE
- Kotlin 1.4
<h2>II. SpringBoot Kotlin RESTful Web Service</h2>
SpringBoot supports us a lots for build a RESTful Web Service with <code>@RestController</code> annotation:

<pre><code class="language-java">
[...]
@RestController
class KotlinRestController {
	...
}
</code></pre>

For use it, we need a <code>spring-boot-starter-web</code> dependency.
By default, SpringBoot starts an embedded <strong>Tomcat container</strong> at port: 8080. We can use <code>server.port</code> in <strong>application.properties</strong> to change the default.
<h2>III. Practice</h2>
In the tutorial, we create a SpringBoot project as below image:

<img src="https://grokonez.com/wp-content/uploads/2017/08/spring-kotlin-restful-api-project-structure.png.png" alt="spring-kotlin-restful-api-project-structure.png" width="342" height="199" class="alignnone size-full wp-image-7607" />

<strong>Step to do</strong>:
- Create SpringBoot project
- Create model data
- Create RestController
- Run and Check results
<h3>1. Create SpringBoot project</h3>
Using <strong>SpringToolSuite</strong> to create a SpringBoot project.

<div class="jsa-quote">
>>> Refer more at: <a href="https://grokonez.com/spring-framework/spring-boot/kotlin-start-spring-kotlin-development-springboot-maven-springtoolsuite">Kotlin – How to start Kotlin development with SpringBoot + Maven + SpringToolSuite</a>
</div>

Then add needed dependency:

More at:

https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller

Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController