From ea75a38349036b0203eb22a31fe46895309b0da0 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 15 May 2022 20:46:35 -0500 Subject: [PATCH] Add Run The Development Server From Another Port as a Remix til --- README.md | 7 +++++- ...he-development-server-from-another-port.md | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 remix/run-the-development-server-from-another-port.md diff --git a/README.md b/README.md index 05881df..4d46a29 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1197 TILs and counting..._ +_1198 TILs and counting..._ --- @@ -50,6 +50,7 @@ _1197 TILs and counting..._ * [React Native](#react-native) * [React Testing Library](#react-testing-library) * [ReasonML](#reasonml) +* [Remix](#remix) * [RSpec](#rspec) * [Ruby](#ruby) * [sed](#sed) @@ -904,6 +905,10 @@ _1197 TILs and counting..._ - [Using Optional Labeled Function Arguments](reason/using-optional-labeled-function-arguments.md) - [Wrapping A Component For Use In JavaScript](reason/wrapping-a-component-for-use-in-javascript.md) +### Remix + +- [Run The Development Server From Another Port](remix/run-the-development-server-from-another-port.md) + ### RSpec - [Check Specific Arguments To Received Method](rspec/check-specific-arguments-to-received-method.md) diff --git a/remix/run-the-development-server-from-another-port.md b/remix/run-the-development-server-from-another-port.md new file mode 100644 index 0000000..3536810 --- /dev/null +++ b/remix/run-the-development-server-from-another-port.md @@ -0,0 +1,22 @@ +# Run The Development Server From Another Port + +By default the [remix](https://remix.run/) development server runs on port +`3000`. There are two ways that you can specify a different port using an +environment variable. + +First, you can specify the port from the command line when starting up the +server. + +```bash +$ PORT=4444 npm run dev +``` + +Second, you can include the `PORT` environment variable in your `.env` file so +that you don't have to remember to include it from the CLI each time. Add the +following line to your `.env` file for that. + +``` +PORT=4444 +``` + +Run `npm run dev` and you'll see the server start up at `localhost:4444`.