BlogGuides

How to ship on a Friday without the weekend stress

Feature flags let you deploy unfinished work safely and switch it on when you’re ready. Here’s how to set one up in a Next.js app.

Kev2 min read

Friday deploys have a bad reputation, and usually it’s deserved. But the risk isn’t the deploy itself. It’s that the deploy and the launch are the same moment. Pull those apart and Friday is just another day.

Key takeaways

  • Deploy the code whenever it’s merged. Release the feature when it’s ready.
  • Keep each environment’s flag state separate.
  • Schedule the switch so nobody has to be online to launch.

Deploying isn’t the same as releasing

Most teams treat a deploy and a release as one event. Feature flags split them apart. The code goes out with everything else, and the feature stays hidden until you switch it on from the dashboard.

That means a Friday deploy carries almost no risk: customers see exactly what they saw on Thursday. The launch happens later, on purpose, when someone has decided it should.

Merge on Friday. Release on Monday. Nobody touches a keyboard over the weekend.

Set up your first flag

  1. Install the SDK in your Next.js project.
  2. Create a flag called new-checkout in the dashboard.
  3. Wrap the new feature in a check for that flag.
npm i @flaggish/sdk

Check the flag in a Server Component

// app/checkout/page.tsx
  import { getFlag } from '@flaggish/sdk'

  export default async function CheckoutPage() {
    const newCheckout = await getFlag('new-checkout')
    return newCheckout ? <NewCheckout /> : <Checkout />
  }

Example code. Function names are placeholders: check the docs for the SDK’s exact API.

Tip: name flags after the feature, not the ticket, so they still make sense in six months.

One flag, three environments

Turn the feature on in development and staging while it stays off in production. Your team can click through the new checkout on staging all week, and customers never see it.

The same flag, set separately in each environment.

Watch out: once a feature is fully on and stable, remove the flag and the old code path. Flags left in place for months turn into dead branches nobody dares delete.

Which plan you need

Flagpole covers a solo project. If you want the flag to switch itself on at a set time, that’s a scheduled flag, which comes with Full Mast.

FeatureFlagpoleFull Mast
Flags10Unlimited
EnvironmentsMul tipleMultiple
Scheduled flags–Yes
Price£0£30 a month per project

Ready to try it on your next Friday deploy? Request early access.

Kev

More from the blog

Request early access

Become a beta user, or stay up to date with the project.