A basic Node.js practice project demonstrating module usage and date manipulation with JavaScript.
This is a learning project focused on Node.js fundamentals, including:
- Creating and importing custom modules
- Working with npm packages
- Date manipulation
- Basic Node.js project structure
- Node.js - JavaScript runtime environment
- JavaScript - Programming language
- npm - Package manager
practica-nodejs/
βββ main.js # Main entry point
βββ date.js # Date utility module
βββ package.json # Project configuration
βββ package-lock.json # Dependency lock file
βββ .gitignore # Git ignore rules
- Node.js installed (v12 or higher recommended)
- npm (comes with Node.js)
git clone https://github.com/Andresflorezdev/practica-nodejs. git
cd practica-nodejsnpm install
npm start
Or directly with Node:
node main.js
- isnumber (v1.0.0) - Package for number validation
This practice project covers:
- β Setting up a Node.js project from scratch
- β
Understanding
package.jsonconfiguration - β Creating and exporting custom modules
- β Importing and using external npm packages
- β Working with JavaScript Date objects
- β
Using
require()for module imports - β Running Node.js applications
- Custom date module for date operations
- Number validation using external package
- Modular code structure
- npm scripts for easy execution
// Exporting from date.js module.exports = { /* your functions */ }; // Importing in main.js const date = require('./date');
- Using
npm installto add dependencies - Managing versions in
package.json - Understanding
node_modulesfolder
- Configured start script:
npm start - Runs
node main.jsautomatically
npm start # Run the application npm test # Run tests (not configured yet)
package.json details:
- Name: primer_proyecto
- Version: 1.0.0
- License: MIT
- Author: Andres Florez
- Add more utility modules
- Implement unit tests
- Add error handling
- Create additional examples
- Add documentation for each module
This project is ideal for:
- Node.js beginners
- Understanding module system
- Learning npm basics
- JavaScript practice
This is a learning project, but suggestions are welcome!
- Fork the project
- Create your feature branch (
git checkout -b feature/NewFeature) - Commit your changes (
git commit -m 'Add some NewFeature') - Push to the branch (
git push origin feature/NewFeature) - Open a Pull Request
β Star this repo if it helped you learn Node.js!