The new client-side application of The Stuyvesant Spectator, built using various modern technologies including NextJS, Typescript, and MongoDB
- Clone the repository
git clone https://github.com/stuyspec/stuyspec-rewrite.git
- Install all dependencies
npm install
# or
yarn
- Set up the
.env.local
Create a.env.local
file, with MONGODB_URI being the credentials for your development mongodb database
# In .env.local
MONGODB_URI=mongodb+srv://...
Optionally, add a api token for MailerLite in MAILERLITE_API_TOKEN
- Run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page hot reloads as you edit the file.
API routes can be accessed on http://localhost:3000/api/articles. This endpoint can be edited in pages/api/articles/index.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Build the app with docker.
docker build -t stuyspecrewrite .
Next, run the built container.
docker run -p 127.0.0.1:3000:3000 stuyspecrewrite
We welcome pull requests from Spec Web developers and seasoned JavaScript developers alike! Please follow these steps to contribute.
This is a Next.js project bootstrapped with create-next-app
.
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.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Favicons generated with realfavicongenerator.net