Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Notifications = require('react-notification-system-redux');
import Player from '../../game_models/players/Player';
import AI from '../../game_models/players/AI';
import Room from '../../game_models/rooms/Room';
import Game from '../../game_models/games/Game';
import {Message, ResignMessage, AbortMessage} from '../../game_models/rooms/Message';
//Game Rules
import FourGame from '../../game_models/games/FourGame';
import Standard from '../../game_models/games/Standard';
import CrazyHouse from '../../game_models/games/CrazyHouse';
//server environment
const dotenv = require('dotenv').load();
const env = process.env.NODE_ENV || "development";
module.exports = function(io, socket, connection) {
socket.on('new-message', data => {
let roomName: string = data.thread;
let player: Player = connection.getPlayerBySocket(socket);
let room: Room = connection.getRoomByName(roomName);
if(!room) return;
//add the message to the room
room.addMessage(new Message(player, data.msg, roomName));
// tell everyone there is a new message
io.to(room.name).emit('update-room-full', room.getRoomObjFull());
// load the env file
require('dotenv').load();
var port = process.env.PORT || '6666';
// how we log
const logger = require("./src/lib/logger").logger;
const logHandler = require("./src/lib/logger").logHandler;
// how we receive npm hooks
const server = require("./src/lib/hook_receiver");
// how we post to slack
const slack = require('./src/lib/slack_client').client;
const channelID = require('./src/lib/slack_client').channelID;
// routes live in a separate place
const routes = require('./src/routes');
if (!process.env.NODE_ENV) require('dotenv').load(); // eslint-disable-line
const config = {
development: {
dialect: 'postgres',
database: process.env.DATABASE_NAME,
host: process.env.DATABASE_HOST,
username: process.env.DATABASE_USER,
password: process.env.DATABASE_PASSWORD,
port: 5432,
},
production: {
dialect: 'postgres',
dialectOptions: {
ssl: true,
},
use_env_variable: 'DATABASE_URL',
'use strict';
require('dotenv').load();
// Load deps
const Hapi = require('hapi');
const db = require('./database');
let server;
module.exports = server = new Hapi.Server();
// Set the port for listening
server.connection({
host: process.env.SERVER_HOST || 'localhost',
port: process.env.SERVER_PORT || '8000'
});
/* eslint-disable no-unused-vars */
const path = require('path');
const _ = require('lodash');
const pjson = require('../package.json');
require('dotenv').load({ silent: true });
const config = {
all: {
env: process.env.NODE_ENV || 'development',
port: process.env.API_PORT || 2121,
host: process.env.API_HOST || 'localhost',
ip: process.env.IP || '0.0.0.0',
app: pjson.name,
version: pjson.version,
prefix: '/api/v1',
dateFormat: 'yyyy-MM-dd',
timeZone: '-07:00',
postgres: {
uri: process.env.POSTGRES_CONN_URI,
pool: {
min: 2,
require('dotenv').load();
const config = require('config');
const resetDb = require('../lib/reset_db.js');
module.exports = {
'@tags': ['donate_page'],
beforeEach: client => resetDb(client),
'Donate button shows €100.00': (client) => {
client
.url(`${config.host.website}/testcollective/donate/100/February Meetup`)
.waitForElementVisible('body', 1000)
.assert.containsText('div[class=Tier]', 'February Meetup')
.assert.containsText('div[class=DonateDisclaimer]', '€100,00')
.end();
},
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './containers/App';
import registerServiceWorker from './registerServiceWorker';
if (process.env.NODE_ENV !== 'production') {
require('dotenv').load();
}
ReactDOM.render(, document.getElementById('root'));
registerServiceWorker();
require('dotenv').load();
if (process.env.NODE_ENV !== 'production') {
throw Error('BoldrCMS is trying to run in production mode, but the NODE_ENV is not set properly.');
}
require('../boldr/boldrCMS/server');
require('dotenv').load();
module.exports = (grunt) => {
grunt.initConfig({
eslint: {
target: ['./app/**/*.js']
}
});
grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', ['eslint']);
};
require('dotenv').load();
require('../boldrCMS/server/index.js');