DEV Community

cychu42
cychu42

Posted on

Setup for Telescope

Task
This week, I try to revisit my setup for running the Telescope project, a single page website that aggregates blog posts.

Getting Basic Components
As I have done this before to contribute to the repo, this is hardly new to me. I start by following the Environment Setup document in the repo. Obviously, you need to downland a copy of the project first.
To run the project locally, I need to have:

  1. Node.js
  2. pnpm
  3. Docker

I always have Node.js installed. Docker is a PaaS for running software. I choose to get Docker Desktop for Window from the listed options for Docker in the setup documentation, and it's just running the installation program.
For pnpm, as described by the documentation, I installed it by entering the command npm install -g pnpm in your command line. This is a package manager like npm with some differences in file structure and handling of directory dependencies and installation.

Setup
When I open the project in VS Code, it prompts me about ESlint and Docker apps that the project uses, so I make sure to have them.
I run pnpm install command to install dependencies in the project while I'm in the project's directory folder.
There are different ways to run the project in the documentation, and I want to run both frontend and backend, so I run pnpm services:start to run the project locally. If Docker is running, it should setup to host the project locally. Be sure to run pnpm services:stop when you are done, and clear the cache if you need to.
If I need to use the database in some way, like testing login, I make sure to run cp ./src/db/env.example .env to get the right env file copy and then run pnpm db:init to setup the database.

Difficulty and Learning
It's a bit hard to wrap my head around it when I first try to run the project locally, because I didn't have a chance to touch pnpm and Docker before, so I had very little idea of how they work with the project. Of course, this means I get to learn what they are and how to use them for a project like this.
Also, there wasn't an explanation for how to setup the database in the setup documentation at the time, so I had to find it by digging through comments on project's Slack channel.
After some revisions to the project, there are now less bug in setting up the environment, and the documentation are much clearer.

Top comments (0)