Skip to content

fumiX/fuBlog

Repository files navigation

fumiX blog icon fuBlog

Build status of main branch Version in package.json Latest git tag Latest GitHub release License recognized by GitHub

A blog software written in Typescript, with an Express.js backend and a Vue3 frontend.

Requirements

Ports

  • 5000: dev server
  • 5010: dev client
  • 5020: dev postgres
  • 5030: login portal (fake OAuth)
  • 5040: dev SMTP server (HTTP port)
  • 5041: dev SMTP server (SMTP port)
  • 5100: production app
  • 5120: production postgres

Start the app for local development

Preparations

General

Unless otherwise stated, all commands should be executed in the root directory of the project.

npm install

IntelliJ

In case you develop in an IntelliJ IDE, you can initialize or override your IDE settings with useful defaults by doing this:

# It's good practice to commit any uncommitted changes before doing this,
# so nothing is lost (should generally be safe, but not guaranteed)
git restore --overlay --source intellij .

Takes the contents of the intellij branch and overlays these files on the current worktree.

If you don't have a local copy of that branch, try replacing intellij with origin/intellij.

Full build of the project

npm run build

At the moment this needs to be repeated every time the common module changes.

Start the server and vue3 client for development

npm start

Setup for user login

See the OAuth docs for instructions how to setup login for different OAuth providers.

Starting a task in the subprojects

The project consists of three subprojects (in NPM terminology “workspaces”): client, server, common

NPM scripts of these workspaces can be run like this:

# Runs task ‹taskName› in ‹workspaceName› (`--workspace` can be shortened to `-w`)
npm run --workspace ‹workspaceName› ‹taskName›
# Runs task ‹taskName› in all workspaces (`--workspaces` can be shortened to `-ws`)
npm run --workspaces ‹taskName›