Skip to content

Commit

Permalink
remove runkit (#1635)
Browse files Browse the repository at this point in the history
* remove runkit

* back to commonjs
bjohansebas authored Oct 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 52bf0e7 commit 6aa7167
Showing 4 changed files with 8 additions and 38 deletions.
12 changes: 2 additions & 10 deletions en/starter/hello-world.md
Original file line number Diff line number Diff line change
@@ -12,8 +12,7 @@ redirect_from: "/starter/hello-world.html"
Embedded below is essentially the simplest Express app you can create. It is a single file app — _not_ what you'd get if you use the [Express generator](/{{ page.lang }}/starter/generator.html), which creates the scaffolding for a full app with numerous JavaScript files, Jade templates, and sub-directories for various purposes.
</div>

<script src="https://embed.runkit.com" data-element-id="hello-example" data-mode="endpoint" async defer></script>
<div id="hello-example"><pre><code class="language-js">
```js
const express = require('express')
const app = express()
const port = 3000
@@ -25,18 +24,11 @@ app.get('/', (req, res) => {
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
</code></pre></div>
```

This app starts a server and listens on port 3000 for connections. The app responds with "Hello World!" for requests
to the root URL (`/`) or _route_. For every other path, it will respond with a **404 Not Found**.

The example above is actually a working server: Go ahead and click on the URL shown. You'll get a response, with real-time logs on the page, and any changes you make will be reflected in real time. This is powered by [RunKit](https://runkit.com), which provides an interactive JavaScript playground connected to a complete Node environment that runs in your web browser.
Below are instructions for running the same app on your local machine.

<div class="doc-box doc-info" markdown="1">
RunKit is a third-party service not affiliated with the Express project.
</div>

### Running Locally

First create a directory named `myapp`, change to it and run `npm init`. Then, install `express` as a dependency, as per the [installation guide](/{{ page.lang }}/starter/installing.html).
12 changes: 2 additions & 10 deletions id/starter/hello-world.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,7 @@ lang: id
Contoh di bawah ini pada dasarnya adalah aplikasi Express paling sederhana yang dapat Anda buat. Ini adalah aplikasi file tunggal &mdash; _bukan_ apa yang akan Anda dapatkan jika menggunakan [Generator Express](/{{ page.lang }}/starter/generator.html), yang membuat struktur untuk aplikasi lengkap dengan banyak file JavaScript, dengan templat Jade, dan sub- direktori untuk berbagai tujuan.
</div>

<script src="https://embed.runkit.com" data-element-id="hello-example" data-mode="endpoint" async defer></script>
<div id="hello-example"><pre><code class="language-js">
```js
const express = require('express')
const app = express()
const port = 3000
@@ -24,18 +23,11 @@ app.get('/', (req, res) => {
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
</code></pre></div>
```

Aplikasi ini memulai server dan mendengarkan koneksi pada _port_ 3000. Aplikasi merespon dengan "Hello World!" untuk _request_
ke URL _root_ (`/`) atau _route_. Untuk setiap jalur lainnya, ia akan merespons dengan **404 Not Found**.

Contoh di atas sebenarnya adalah server yang berfungsi: Silakan klik URL yang ditampilkan. Anda akan mendapat respons, dengan log real-time di halaman, dan perubahan apa pun yang Anda buat akan terlihat secara real-time. Hal ini didukung oleh [RunKit](https://runkit.com), yang menyediakan _playground_ untuk JavaScript secara interaktif yang terhubung ke lingkungan Node secara lengkap yang berjalan di browser web Anda.
Di bawah ini adalah petunjuk untuk menjalankan aplikasi yang sama di komputer lokal Anda.

<div class="doc-box doc-info" markdown="1">
RunKit adalah layanan pihak ketiga yang tidak berafiliasi dengan proyek Express.
</div>

### Berjalan secara Lokal

Pertama buat direktori bernama `myapp`, masuk ke direktori tersebut dan jalankan `npm init`. Kemudian, instal `express` sebagai dependensi, sesuai dengan [panduan instalasi](/{{ page.lang }}/starter/installing.html).
11 changes: 2 additions & 9 deletions th/starter/hello-world.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,7 @@ lang: th
โค้ดด้านล่างนี้เป็นแอปพลิเคชัน Express จำเป็นแบบง่ายที่สุดที่คุณสามารถสร้างขึ้นได้ โดยเป็นไฟล์ app ไฟล์เดียว &mdash; _ไม่ใช้_ โค้ดที่ได้จาก [Express generator](/{{ page.lang }}/starter/generator.html) ที่สร้างโครงสร้างเริ่มต้นสำหรับแอปพลิเคชันตัวเต็มที่มีไฟล์ JavaScript มากมาย และไดเรทอรีย่อยสำหรับวัตถุประสงค์ต่างๆ
</div>

<script src="https://embed.runkit.com" data-element-id="hello-example" data-mode="endpoint" async defer></script>
<div id="hello-example"><pre><code class="language-js">
```js
const express = require('express')
const app = express()
const port = 3000
@@ -24,17 +23,11 @@ app.get('/', (req, res) => {
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
</code></pre></div>
```

app นี้จะเริ่มต้นเซิร์ฟเวอร์และเฝ้าตรวจสอบ (listen) การเชื่อมต่อที่พอร์ต 3000 โดยที่ app จะตอบสนองด้วงคำว่า "Hello World!" สำหรับการร้องขอ
มายัง root URL (`/`) หรือ _route_ แต่สำหรับ path อื่นๆ app จะตอบสนองด้วย **404 Not Found**

ตัวอย่างด้านบนเป็นเซิร์ฟเวอร์ที่ทำงานได้จริง โดยกดไปที่ลิงค์ URL ที่แสดงอยู่จะเปิดหน้าเว็บใหม่และตอบสนองคำร้องขอของคุณอย่างทันที และสิ่งที่คุณแก้ไขจะเปลี่ยนแปลงที่หน้าเว็บ เพียงกดไปที่ลิงค์อีกครั้ง ได้รับการสนับสนุนจาก [RunKit](https://runkit.com) ซึ่งให้การเชื่อมต่อ interactive JavaScript playground สำหรับสิ่งแวดล้อมที่สมบูรณ์ของ Node บนเว็บเบราว์เซอร์ คำสั่งด้านล้างสำหรับรัน app เดียวกันบนเครื่องของคุณ

<div class="doc-box doc-info" markdown="1">
RunKit เป็นบริการของบริษัทอื่นที่ไม่ใช้หน่วยงานของโครงการ Express
</div>

### รันบนเครื่องของคุณ

เริ่มต้นด้วยการสร้างไดเรกทอรีชื่อว่า `myapp` เปลี่ยนไปที่ไดเรกทอรีที่สร้างขึ้นแล้วใสคำสั่ง `npm init` แล้วติดตั้ง `express` และ dependency ต่างๆ ดัง[ขั้นตอนการติดตั้ง](/{{ page.lang }}/starter/installing.html)
11 changes: 2 additions & 9 deletions tr/starter/hello-world.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,7 @@ lang: tr
Aşağıda verilmiş olan, Express ile oluşturabileceğiniz en basit uygulamadır. Bu, birçok JavaScript dosyası, Jade şablonları ve çeşitli alt dizinler içeren [Express generator](/{{ page.lang }}/starter/generator.html) ile oluşturacağınız projelerin aksine tek dosyadan oluşan bir projedir.
</div>

<script src="https://embed.runkit.com" data-element-id="hello-example" data-mode="endpoint" async defer></script>
<div id="hello-example"><pre><code class="language-js">
```js
const express = require('express')
const app = express()
const port = 3000
@@ -24,16 +23,10 @@ app.get('/', (req, res) => {
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
</code></pre></div>
```

Bu uygulama bir sunucu çalıştırır ve gelen bağlantılar için 3000 portunu dinler. (`/`) kök dizinine gelen isteklere "Hello World!" ile yanıt verir. Bunun haricindeki tüm adreslere, **404 Not Found** hatası verecektir.

Yukarıdaki örnek gerçekten de çalışmakta olan bir sunucudur: Yukarıda verilen adrese tıklayın. Gerçek zamanlı günlüklerle sunucunun bir cevap verdiğini göreceksiniz, ve yukarıda yapacağınız her değişiklik eş zamanlı olarak çalıştırılacaktır. Bu özellik arkada bir Node sistemine bağlı olup, tarayıcınızda bu sisteme bir arayüz sağlayan [RunKit](https://runkit.com) sayesinde bulunmaktadır.


<div class="doc-box doc-info" markdown="1">
RunKit bir üçüncü parti uygulamasıdır ve Express projesi ile bir bağı yoktur.
</div>

### Bilgisayarınızda Çalıştırmak

0 comments on commit 6aa7167

Please sign in to comment.