Skip to content

My web portfolio powered by Remix and Hono.

License

Notifications You must be signed in to change notification settings

prests/remix-portfolio

Repository files navigation

Remix Portfolio · E2E Tests CI Tests

Welcome to my portfolio built on Hono and Remix! I like to play around with new frameworks and technology and this is one I've been working with recently! If you like this build be sure to checkout the template I made to make your own; or fork this one!

📧 Note: If you like what you see and would like to get in contact with me please email me at shayne.preston@protonmail.com

Setup

Install Setup NVM, PNPM, and Dependencies

I find NVM to be a great way to switch between node versions when working on multiple projects. Whether it's node v20, v18, or v8 NVM can quickly swap node versions!

Once NVM is setup run the following:

nvm install
npm i -g pnpm@^8
pnpm install

Alternatively, you can use corepack to manage your package management.

After running pnpm install various lifecycle scripts will run to setup git hooks and certificates to utilize https for the dev server.

Setting Up Localhost

You'll need to modify your operating system's host file to include local.example-test.com this is helps with CORS and CSP issues that can come up when just using localhost or 127.0.0.1.

Setting Up Environment Variables

Most production applications require environment variables to configure settings securely. We’ll set up a .env file to inject variables locally, making them accessible via process.env. This template also uses Zod to ensure type safety when loading these variables.

  1. Create a .env file at the root of the project and add the following values:
ABORT_DELAY=5000
  1. These variables are now accessible on the process.env object when the server starts and validated with Zod to catch any type issues early.

Running Dev Server

To start the dev server run the following and navigate to the url provided in the terminal:

pnpm dev

Testing

  • Unit/Integration Tests: Run the following to test individual components or functions in isolation:
pnpm test
  • End-to-End (E2E) Tests: Run the following to simulate user interactions across different browsers:
pnpm test:e2e:local

Linting, Formatting, and Typechecking

Most IDEs will take in the provided eslint and prettier configs and automatically format files on save. If not running the following will check to make sure there are no styling issues:

pnpm lint # eslint check
pnpm format:verify # prettier check
pnpm typecheck # typechecking