In order to run this project, a few technologies are required:
If you have these installed already, you can skip to running this project.
Node.js is what allows us to write all our applications in JavaScript. Usually, JavaScript is run only in a web browser. By building on top of Node.js, we can write code that is executed on the server, simpler to write, and/or more secure.
On windows, you can install node from the Node.js downloads page. Make sure you install the LTS (long-term support) version! Download and run the installer.
Once the installation is finished (and you have restarted you computer if prompted), you can continue to installing Docker.
It is recommended to use node version manager (nvm) to install and run node on Mac/Linux. You can install is by using the command found here in your terminal application. Alternatively, you can follow the installation instructions in the windows instructions.
Once you have installed node version manager installed, run the following commands in your terminal:
nvm install --lts # Install latest version of Node.js
nvm install-latest-npm # Update npm to latest versionThese commands do the following:
- Install the long-term support (LTS) version of Node. The LTS version is the version of Node that will receive security updates the longest.
- Update the node package manager (npm) to the latest version.
This completes your installation of Node!
pnpm is an improved version of the Node Package Manager (npm). Though not required, it is highly recommended that you install it. You can install it using the following command in your terminal/powershell after node has been installed
npm install -g pnpmIf you choose to install pnpm, then you can substitute all usage of 'npm' with 'pnpm' and all usage of 'npx' with 'pnpx'. Additionally, you can create an alias in your .bashrc (Linux) or .zshrc (Mac) files. This will mean that when you type in npm or npx, pnpm and pnpx will be substituted. Use the following commands to add the aliases to the corresponding file:
# Linux
echo 'alias npm="pnpm"' >> .bashrc
# Mac
echo 'alias npm="pnpm"' >> .zshrcMake sure dependencies are installed:
npm install
# or
pnpm install
# remember to run pnpm post install scripts if promptedFirst, run the development server:
npm run dev
# or
pnpm devOpen http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Official Next.js Examples
- Official Next.js with Prisma Example
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
To learn more about Prisma, take a look at the following resources:
This is a Next.js, Prisma, and SQLite project based on the UTDEpics Next.js template