- Timestamp:
- 06/11/22 23:50:19 (3 years ago)
- Branches:
- main
- Children:
- 4a1a3ca
- Parents:
- 87614a5
- Location:
- pages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/api/postgre/index.js
r87614a5 r64dc53b 9 9 const Pool = require('pg').Pool 10 10 const pool = new Pool({ 11 connectionString: 'postgres://postgres:postgres@db/postgres'11 connectionString: `postgres://${process.env.POSTGRES_USER}:${process.env.POSTGRES_PASSWORD}@${process.env.POSTGRES_HOST}/${process.env.POSTGRES_DB}` 12 12 }); 13 13 … … 22 22 // } 23 23 24 // update credits in database25 // setInterval(() => {26 // sessions.filter(session => Date.now() - session.lastActivity > 5*60*1000).forEach(session => {27 // pool.query('UPDATE players SET credits = $1 WHERE username = $2', [session.credits, session.username], (error, results) => {28 // if (error) throw error;29 // });30 // });31 // }, 5*60*1000)32 24 33 25 export default function handler(req, res) { -
pages/index.js
r87614a5 r64dc53b 1 import Head from 'next/head' 2 1 3 import Header from '../components/Header' 2 4 import FullwidthText from '../components/FullwidthText' … … 8 10 import Notification from '../components/Notification' 9 11 import Stats from '../components/Stats' 10 11 import Head from 'next/head'12 13 import { useDispatch } from 'react-redux'14 12 import ManageCredits from '../components/ManageCredits' 15 13 16 14 export default function Home() { 17 const dispatch = useDispatch();18 19 15 return ( 20 16 <div className="app" style={{backgroundImage: 'url("/images/bg.png")'}}> 21 17 <Head> 18 <meta charSet="utf-8"/> 19 <meta name="description" content="Enjoy your stay at Caessino (The best E-Casino out there!). Play Blackjack, Roulette or Poker and win huge prizes!"/> 20 <meta name="keywords" content="caessino, e-casino, casino, blackjack, roulette, poker"/> 21 22 <meta name="author" content="ESS" /> 23 <meta name="copyright" content="ESS CORP" /> 24 22 25 <title>Caessino</title> 23 26 </Head>
Note:
See TracChangeset
for help on using the changeset viewer.