Skip to content

Project Setup

As always with Node project, we need to make sure our project is set up correctly before we start building our application.

You will need to allow NPM scripts to run in the terminal. To do this, follow the steps below:

  1. Open PowerShell on your Windows machine.

  2. Copy and paste the line of code below:

    Terminal window
    Set-ExecutionPolicy -Scope CurrentUser Unrestricted
  3. Hit Return to run the command.

Head back to VS Code and follow the steps below:

  1. Duplicate the file .env.example, and rename your duplicate to .env

  2. Open a new terminal from the VS Code menu - Terminal > New Terminal

  3. In your new terminal, type the following and hit return:

    Terminal window
    npm i

    This process will take a while, so be patient 😴⏰

  4. Once you see the message that everything has been installed, type the following into the terminal and hit return:

    Terminal window
    npm run setup

    Again, this will take a while, so be patient 😴⏰

  5. Finally, from the terminal again, type:

    Terminal window
    npm run dev

    This will start the development server and you can view your project in a web browser by going to http://localhost:3000.

You should see a landing page that looks like this:

Initial landing screen

Now that you have your project set up, you’re ready to start building the Epic News project. Let’s get started!