Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

NodeJS get rootpath of our project

import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #NodeJS #rootpath #project
ADD COMMENT
Topic
Name
7+3 =