This is a simple Node.js project that serves a stylish HTML form using Express. The form allows users to submit their name, email, subject, and message, and it logs the submitted data in the console.
.
├── app.js # Main Node.js server file
├── index.html # HTML file served to the user
├── node_modules/ # Node.js dependencies
├── package.json # Project configuration and dependencies
├── package-lock.json # Dependency lockfile
To run this project, you need the following installed on your system:
- Node.js (v14 or higher)
- npm (comes with Node.js)
Follow these steps to set up and run the project:
- Clone the Repository:
git clone git@github.com:r0han01/Node.js-Basic-Form-Project.gitInstall Dependencies:
- Run the following command to install all necessary dependencies:
npm install- To start the server, run:
node app.js- Open your browser and navigate to:
http://localhost:8080
- Open the application in your browser at http://localhost:8080.
- Fill out the form with your name, email, subject, and message.
- Click the
"Submit"button. - Your form submission will be logged in the terminal running the Node.js server.
npm installInstalls project dependencies.node app.jsStarts the server.npm startAlternative (if a start script is added).
- Server Framework: https://expressjs.com/
- Middleware: https://expressjs.com/en/resources/middleware/body-parser.html
- HTML Design: Simple and responsive form styling with inline CSS.
- This project is open-source and available under the MIT License.
- Feel free to fork this repository, submit issues, or make pull requests. Contributions are welcome!
