Skip to content

savyez/PREX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PREX

Real-time crypto price tracker built with Express and EJS. It pulls market data from CoinGecko, renders price cards, and shows a 7-day chart for a single coin.

Features

  • Node.js + Express + Axios
  • EJS views with partials
  • 7-day sparkline charts for coins
  • Coin search by id (e.g., bitcoin, ethereum)
  • Server refreshes market data every 30 minutes
  • Static assets in public/ (images, styles)
  • Environment configuration via .env

Prerequisites

  • Node.js (16+ recommended)
  • npm

Quick start

  1. Install dependencies
npm install
  1. Create a .env file
PORT=3000
COINGECKO_URL=https://api.coingecko.com/api/v3
API_KEY=your_demo_or_pro_key
  1. Start the app
npm start
# or
node index.js
  1. Open http://localhost:3000 (or the port you set)

Routes

  • GET / Home page
  • GET /prices Market list (top 12 by market cap)
  • GET /search?query=coin-id Single coin chart (7 days)

Project structure

.
|-- .env
|-- .gitignore
|-- index.js
|-- package.json
|-- README.md
|-- public/
|   |-- images/
|   |-- styles/
|       |-- main.css
|       |-- coin.css
|-- views/
|   |-- index.ejs
|   |-- prices.ejs
|   |-- coin.ejs
|   |-- partials/
|       |-- header.ejs
|       |-- footer.ejs

Notes

  • CoinGecko rate limits apply; use an API key if required.
  • Check package.json for available npm scripts.

Netlify Env Vars

Netlify does not read your local .env file in production. Set these in the Netlify UI or CLI so Functions can access them at runtime:

  • COINGECKO_URL = https://api.coingecko.com/api/v3
  • API_KEY = your CoinGecko key

CLI example:

netlify env:set COINGECKO_URL https://api.coingecko.com/api/v3
netlify env:set API_KEY your_demo_or_pro_key

Contributing

Submit issues or pull requests. Keep changes focused and include tests where appropriate.

About

PREX is a real‑time crypto price tracker built with Express and EJS, featuring 7‑day charts, coin search, and automatic data refresh from CoinGecko.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors