The source code for the Discord Previews website.

Overview

discordpreviews.com

Discord

The source code for the Discord Previews website.

Setup

Development Setup

  1. Install dependencies via npm install
  2. Use Docker Compose to run a database via docker-compose up -d, unless you already have a local PostgreSQL database running.
  3. Copy the default .env.example file to .env. If you are using Docker Compose, you can leave everything in that file as-is, otherwise edit it to match your local environment.
  4. Push the Prisma schema to the database via npx prisma db push
  5. Start the development server via npm run dev

Production Setup

  1. Install dependencies via npm install
  2. Copy the default .env.example file to .env. In production you should have a database running locally, so you will need to edit the .env accordingly. Additionally, if you don't want debug logging, you will need to add NODE_ENV=production in the .env file.
  3. Apply database migrations via npx prisma migrate deploy
  4. Build the production server via npm run build
  5. Start the production server via npm run start

Adding an article

Currently adding an article can only be done via the database, though there are plans to add UI for it on the frontend in the future. To add an article, connect to the database and run the following query:

INSERT INTO public."NewsArticle" (slug, content, tags, published)
VALUES ('example', '---
title: Example Article
description: Example Description
---
The content of your news article.', '{keywords,for,seo}', '<ISO 8601 Timestamp>');

If you don't want the article to be shown on the front page, you can simply set the published field to null. Then it will only be accessible via by directly accessing the URL.

You might also like...

In 2012 the King of Spain, Juan Carlos I, transferred 65 million euros to a friend from a secret account in Switzerland. What lies actually behind this rare donation? This repository contains the full source code of the website ladonacion.es.

La Donación full source code and documentation This documentation draft is a work in progress. I expect to have it completed by September 24, 2022. ⭐

Dec 24, 2022

qwik.wrong-lang.click website source code

Qwik App ⚡️ Qwik Docs Discord Qwik Github @QwikDev Vite Partytown Mitosis Builder.io Project Structure Inside of you project, you'll see the following

Oct 7, 2022

A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up 🔥 👨‍💻 A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Dec 12, 2022

Reference for How to Write an Open Source JavaScript Library - https://egghead.io/series/how-to-write-an-open-source-javascript-library

Reference for How to Write an Open Source JavaScript Library The purpose of this document is to serve as a reference for: How to Write an Open Source

Dec 24, 2022

A recreation of a startpage posted on Reddit without the source, so I rewrote it in Next.js + Tailwind for the open source community.

Startpage "Figma Balls" Rewrite Why Did I Make This I saw a startpage posted on the subreddit r/startpages that I thought looked nice, but when I look

Mar 29, 2022

An Open-Source Platform to certify open-source projects.

An Open-Source Platform to certify open-source projects.

OC-Frontend This includes the frontend for Open-Certs. 📜 After seeing so many open-source projects being monetized 💵 without giving any recognition

Oct 23, 2022

This is a project for open source enthusiast who want to contribute to open source in this hacktoberfest 2022. 💻 🎯🚀

This is a project for open source enthusiast who want to contribute to open source in this hacktoberfest 2022.  💻 🎯🚀

HACKTOBERFEST-2022-GDSC-IET-LUCKNOW Beginner-Hacktoberfest Need Your first pr for hacktoberfest 2k22 ? come on in About Participate in Hacktoberfest b

Oct 29, 2022

⚡ A blazing fast, lightweight, and open source comment system for your static website, blogs powered by Supabase

⚡ A blazing fast, lightweight, and open source comment system for your static website, blogs powered by Supabase

SupaComments ⚡ A blazing fast, lightweight, and open source comment system for your static website, blogs 🚀 Demo You can visit the Below demo blog po

Dec 27, 2022

Your non mega-corporate Open source PLM. Click the website down below for more information.

Your non mega-corporate Open source PLM. Click the website down below for more information.

PLMore PLMore is an open-source Product Lifecycle Management Software. It offers an alternative to the heavily priced archahic Windchill/Teamcenter so

Aug 23, 2022
Owner
Marvin Witt
Full-Stack-Developer | React, TypeScript, JavaScript, Kotlin, Java. Working on @CCBlueX's LiquidBounce & @genshindev. Bottom.
Marvin Witt
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

Ink codebase browser, "Kin" ?? The Ink codebase browser is a tool to explore open-source code on GitHub, especially my side projects written in the In

Linus Lee 20 Oct 30, 2022
Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Twitter.

news.ycombinator1.com Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Dis

Ian Langworth ☠ 38 Sep 18, 2022
Random Fractals stash of Observable Data Tools 🛠️ and Notebooks 📚 in ES Modules .js, .nb.json, .ojs, .omd, .html and .qmd document formats for Data Previews

Random Fractals stash of Observable Data Tools ??️ and Notebooks ?? in ES Modules .js, .nb.json, .ojs, .omd, .html and .qmd document formats for Data Previews in a browser and in VSCode IDE with Observable JS extension, Quarto extension, and new Quarto publishing tools.

Taras Novak 14 Nov 25, 2022
Cross-browser plugin to remove addictive features on YouTube like thumbnails, comments, previews and more...

ZenTube Installation Features Remove some (more) elements from Youtube to make it less addictive. Mix and match between the following options: Hide or

inversepolarity 57 Dec 17, 2022
Shikhar 4 Oct 9, 2022
✨This is My Personal Website's Source Code. 👨‍💻 I Make it with Next.js and WindiCSS

?? drackin.tk This is my personal website with Next.js + WindiCSS ☁ Weather API You can use my Weather API to see weather of locations. Simple Request

Drackin Best 5 Dec 15, 2022
Source code my personal website is written using Next.js, Tailwind CSS and Chakra UI

Homepage Overview. / Home page. pages/blog/[slug] - Static pages/social - Social page. pages/photos - Photos page. pages/activites - Activites page Di

Adem Can 6 Dec 13, 2022