Next.js is a framework based on React to build a “full stack” dynamic web application with routing and data handling capability. React provides the page components on top of HTML and JavaScript, Next.js routes between pages, and displays and modifies the data in a database.
Configure the development environment
Install npm
Make sure npx is available on your workstation npx comes with npm 5.2 and higher
Create the Next.js web application
Create the web site skeleton
Create a parent directory for the project
Execute in the terminal npx create-next-app@latest
To select between the options in iTerm use the left and right arrow key on the keyboard
Start the development server
Step into the web application directory cd MY_PROJECT_NAME
When we created the Next.js application above, it created a .gitignore file and initialized the Git repository in the root of the web site. If you want to place more folders in the Git repository, like Terraform files to create cloud resources, the Next.js application will not be in the root of the repository anymore. As some of the entries in the .gitignore file refer to the root with the leading slash, Git will not ignore large libraries.
Move the .gitignore file from the web application directory to the higher level where you want to initialize the Git repository
Delete the .git directory in the web application folder
Navigate to the root directory of the Git repository
Open the .gitignore file and remove the leading slashes from the following lines, because the Next.js application is not in the root of the repository anymore /node_modules /.pnp /coverage /.next/ /out/ /build
Environment variables
.env
Next.js now supports the .env file to declare environment variables during development
Environment variables in the browser
If the environment variable name starts with NEXT_PUBLIC_ the variable is available for the JavaScript code in the browser via process.env instruction:
The React framework adds components on top of HTML and JavaScript to create dynamic one-page web applications. It does not have routing and data handling capabilities, to create a full stack web application use Next.js or Remix.
Configure the development environment
Install npm
Make sure npx is available on your workstation npx comes with npm 5.2 and higher
Create the React web site skeleton
Create the web site skeleton
Create a parent directory for the project
To create a TypeScript project
Open a terminal. We will add –template typescript to the end of the command to use typescript npx create-react-app MY_WEB_SITE_NAME --template typescript
GitHub Copilot is a ChatGPT based AI pair programmer extension for Visual Studio Code, Visual Studio, JetBrains IDE, and Neovim. It is most effective in Python, JavaScript, TypeScript, Ruby, Go, C# and C++.
Create a file with the standard file extension of the language to indicate the preferred programming language to the AI.
Start to create a function with the name that describes its purpose (in this example we will use the JavaScript syntax) function getDaysInMonth(month, year) { (If your IDE automatically adds the closing curly brace, remove it, otherwise Copilot does not offer solutions) or
Create a comment to describe the functionality // Express server on port 3000 and return the current date
Select the suggestion
Use the Alt-[ and Alt-] on Windows, Option-[ and Otion-] on Mac to cycle through the suggested solutions and press Tab to accept it, or Esc to reject all of them.
See all suggestions in a new tab
Press Ctrl-Enter to open a new tab, and a few seconds later all suggestions will be listed in the new tab.
Click the Accept Solution link above the suggestion to insert it into your file.
In the lower right corner of the editor click the Copilot icon
Select the scope to disable GitHub Copilot: for all languages, or for a specific language only.
Tutorials
There are GitHub repositories to learn to use GitHub Copilot. The Tutorials for GitHub Copilot page lists all of them. These are interactive repositories to learn the skills using real code:
skills-getting-started-with-github-copilot – The basics of using GitHub Copilot
skills-expand-your-team-with-copilot – How to use GitHub AI agents to do complex tasks in your repository
Interaction modes
GitHub Copilot has two main modes: Ask mode and Agent mode
Ask is an interactive communication mode, where the Copilot is a chat companion to give you information on the inner workings of the code, and give you brainstorming ideas.
Agent mode can make autonomous edits across multiple files in the project.
GitHub copilot Cheat Sheets
UI specific commands to enhance the work with Chat and Agent at GitHub Copilot Chat cheat sheet The Visual Studio specific commands are:
Chat participants
Chat participants are like domain experts with specialty knowledge. Specify the chat participant with the @ symbol in your prompt. Most common chat participants are
Variable
Specialty
@azure
Azure services – Service deployment and management. – App deployment to Azure.
@github
GitHub – GitHub specific skills.
@terminal
Visual Studio Code Terminal – To create and debug Terminal commands
@vscode
Visual Studio Code – Commands and features
@workspace
The current workspace – Project structure – Code parts interaction – Design patterns
Type the # sign in the chat prompt to display the list of tools. The list contains the list of files referenced in the current chat, and the available tools.
Inline chat can help you with fast responses related to a particular line in the code. To invoke it move the cursor to the line and press Ctrl-I (Cmd-I on Mac), or right-click the line and select Copilot, Editor Inline Chat. If you want the AI to insert lines in to your code, like generating test data by adding elements to an array, place the cursor where the lines should go.
The game settings file is located at C:\Users\YOUR_USER_NAME\AppData\LocalLow\Intercept Games\Kerbal Space Program 2\Global\Settings.json
Mods
Mods make using KSP 2 a better experience. Modders can create functionality faster than the development team, as they only have to concentrate to their particular area. This also means, a game update can render a mod unusable until the modder also updates the mod.
Recommended mods for Kerbal Space Program 2
To configure the mods, in the Settings menu select Mods, and scroll down to the mod to adjust.
Name
Description
Recommended settings
Home page
Docking Alignment Display
Adds a new instrument providing necessary information to dock with precision!
Plan your (Space) Flight! Fly your Plan! Handy tools to help you set up maneuver nodes that will get you where you want to be. Making spaceflight planning easier for Kerbal Space Program 2 one mission at a time.
Lazy Orbit is a simple mod that allows you to set a vessel’s orbit, land it on a surface, or teleport it to another vessel via a simple GUI. Open the GUI by clicking the button in the app bar (or press ALT+H), select a body and an altitude, and press Set Orbit. Great for testing and modding, don’t use it for anything nefarious!
Provides an interface to finely tune maneuver nodes and restores missing maneuver node features from Kerbal Space Program 1. Make fine tuned adjustments to your maneuver nodes even if they are off screen!
When Phaser constructs the input area of an object where the user’s click will trigger the action, it tries to read the dimensions of the image. It usually works, but in some cases the area does not cover the entire image.
To display the input area add the enableDebug() function to your code.
When Node.js libraries cannot open files on the local disk, the file does not exist at the specified location, or the file or folder permission are not correct.
When you try to run an older Node.js application under a new version of Node.js you may get deprecation warnings. If you downgrade Node.js and keep the out of date component, you will introduce a dangerous security risk in your application.
To refresh the referenced Node.js libraries
In the command line execute npm install --force npm audit fix --force
If you use a Macintosh computer, you use the Command key all the time. Unfortunately, on the Windows keyboard you will always accidentally hit the Windows key. This can be very frustrating, as pressing the Windows key with any of the cursor keys will resize the current window.