Changeset 64dc53b for pages


Ignore:
Timestamp:
06/11/22 23:50:19 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
4a1a3ca
Parents:
87614a5
Message:

Code cleanings

Location:
pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pages/api/postgre/index.js

    r87614a5 r64dc53b  
    99const Pool = require('pg').Pool
    1010const 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}`
    1212});
    1313
     
    2222// }
    2323
    24 // update credits in database
    25 // 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)
    3224
    3325export default function handler(req, res) {
  • pages/index.js

    r87614a5 r64dc53b  
     1import Head from 'next/head'
     2
    13import Header from '../components/Header'
    24import FullwidthText from '../components/FullwidthText'
     
    810import Notification from '../components/Notification'
    911import Stats from '../components/Stats'
    10 
    11 import Head from 'next/head'
    12 
    13 import { useDispatch } from 'react-redux'
    1412import ManageCredits from '../components/ManageCredits'
    1513
    1614export default function Home() {
    17   const dispatch = useDispatch();
    18 
    1915  return (
    2016    <div className="app" style={{backgroundImage: 'url("/images/bg.png")'}}>
    2117      <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
    2225        <title>Caessino</title>
    2326      </Head>
Note: See TracChangeset for help on using the changeset viewer.