src/js/start_node.js
function reload_file(arg_file_path)
{
	const file_name = path.basename(arg_file_path)
	const this_file_name = path.basename(__filename)
	if (file_name == this_file_name)
	{
		console.info('Need to reload after change on ' + this_file_name)
		return
	}
	
	const exts = ['.js', '.json']
	const ext = path.extname(arg_file_path)
	const full_path = path.resolve(arg_file_path)
	
	if ((exts.indexOf(ext) > -1) && (full_path in require.cache))
	{
		console.info('Reloading: ' + full_path)
		// console.log(require.cache[full_path].parent.children[0])
		
		delete require.cache[full_path]
		require(full_path)
	}
}
function reload_file(arg_file_path)
{
	const file_name = path.basename(arg_file_path)
	const this_file_name = path.basename(__filename)
	if (file_name == this_file_name)
	{
		console.info('Need to reload after change on ' + this_file_name)
		return
	}
	
	const exts = ['.js', '.json']
	const ext = path.extname(arg_file_path)
	const full_path = path.resolve(arg_file_path)
	
	if ((exts.indexOf(ext) > -1) && (full_path in require.cache))
	{
		console.info('Reloading: ' + full_path)
		// console.log(require.cache[full_path].parent.children[0])
		
		delete require.cache[full_path]
		require(full_path)
	}
}
function reload_file ( arg_file_path ) { const file_name = path . basename ( arg_file_path ) const this_file_name = path . basename ( __filename ) if ( file_name == this_file_name ) { console . info ( 'Need to reload after change on ' + this_file_name ) return } const exts = [ '.js' , '.json' ] const ext = path . extname ( arg_file_path ) const full_path = path . resolve ( arg_file_path ) if ( ( exts . indexOf ( ext ) > - 1 ) && ( full_path in require . cache ) ) { console . info ( 'Reloading: ' + full_path ) // console.log(require.cache[full_path].parent.children[0]) delete require . cache [ full_path ] require ( full_path ) } }
Reload a file.

@param {string} arg_file_path - file path name.

@returns {nothing}
Reload a file .