blank

mrfdn.com – File ENV biasa digunakan untuk mendefinisikan apa saja yang akan dipanggil pada projekan kita.

Dengan membuat file env, projekan akan jauh lebih secure, clean dan lebih mudah untuk dimaintain.

Di sini saya ingin set file ENV pada projekan SvelteKit yang sudah dibuat kemarin yaitu tentang menampilkan data dari database dengan menyembunyikan path database.

Langsung saja, caranya seperti ini:

  1. Pada root folder projekan sveltekit, buatlah sebuah file bernama .env, pakai titik di depannya sehingga akan menjadi hidden file nanti. Kemudian isi file tersebut dengan lokasi file database.db:
DB_PATH=./src/database/mydatabase.db
  1. Kemudian edit file +server.js sehingga menjadi seperti ini:
import { DB_PATH } from '$env/static/private';import { error, json } from '@sveltejs/kit';import Database from "better-sqlite3";let db = new Database(DB_PATH, { verbose: console.log });export function GET() { const items = db.prepare("select * from mytable"); return json(items.all());}

Selesai.

Sekarang coba jalankan server lalu pastikan semuanya berjalan dengan normal seperti sebelum menambahkan file .env.

Semoga bermanfaat.

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Jasa Backlink

Download Anime Batch

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

TOP