Welcome to the Rap Names API! This project provides comprehensive rapper profiles using serverless functions deployed on Netlify. The frontend is styled using Tailwind CSS in a very simple Brutalist style.
- Introduction
- Features
- Technologies Used
- Setup and Installation
- How to Use
- Deploying to Netlify
- Contributing
- License
The Rap Names API is a simple web application that serves detailed profiles of various rappers. It utilizes serverless functions to handle API requests and Tailwind CSS for styling.
- Serverless architecture using Netlify functions
- Tailwind CSS for styling with a Brutalist design
- Dynamic dropdown to fetch and display rapper profiles
- Easy to deploy and extend
- Frontend: HTML, Tailwind CSS
- Backend: Node.js, Express.js (converted to serverless functions)
- Deployment: Netlify
Follow these steps to set up and run the project locally:
-
Clone the Repository
git clone https://github.com/your-username/rap-names-api.git cd rap-names-api
-
Install Dependencies
Make sure you have Node.js installed, then run:
npm install
-
Set Up Tailwind CSS
Ensure you have the necessary configuration files:
-
postcss.config.js
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, };
-
tailwind.config.js
module.exports = { purge: ["./public/**/*.html", "./src/**/*.{js,jsx,ts,tsx,vue}"], darkMode: false, theme: { extend: {}, }, variants: { extend: {}, }, plugins: [], };
-
-
Build CSS
Run the Tailwind CSS build command:
npm run build:css
-
Run Locally
Start the server:
npm start
Open your browser and navigate to
http://localhost:8000
.
- Select a rapper from the dropdown menu.
- View the detailed profile of the selected rapper, including age, birth name, and birth location.
To deploy this project to Netlify:
-
Push Your Project to GitHub
Ensure all your changes are committed and pushed to GitHub:
git add . git commit -m "Prepare for Netlify deployment" git push origin main
-
Create a New Site on Netlify
- Go to Netlify and log in.
- Click on “New site from Git”.
- Connect to your GitHub account and select the repository.
- Configure the build settings:
- Build Command:
npm run build:css
- Publish Directory:
public
- Build Command:
-
Deploy the Site
Netlify will build and deploy your site automatically. You can view the live site once the deployment is complete.
Contributions are welcome! Please fork this repository and submit pull requests.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.