This is a user management application developed using the ejs view engine amongst other technologies, with CRUD capabilities.
HTML
: HTML is used for structuring and presenting content.CSS
: CSS is used for styling and layout of the web page.javascript
: JavaScript is used for adding interactivity and behavior to the web page.ejs
: EJS (Embedded JavaScript) is a templating language that enables dynamic content generation on the server-side. It allows the embedding of JavaScript code within the HTML templates, making it easier to generate dynamic HTML content.cors
: CORS (Cross-Origin Resource Sharing) is a mechanism that allows web browsers to make cross-origin requests securely. It is used to control access to resources (e.g., APIs) on different domains, ensuring proper security and preventing unauthorized access.dotenv
: dotenv is a library that allows the loading of environment variables from a .env file into the application's environment. It is used in this development environment to manage sensitive configuration information, such as the API key.express
: Express is a popular web application framework for Node.js. It provides a simple and flexible way to build web applications and APIs. Express is used to build the server-side of this application and handle routing, middleware support, and request/response.nodemon
: Nodemon is a development tool that monitors changes in your Node.js applications and automatically restarts the server when files are modified.axios
: Axios is a popular JavaScript library used for making HTTP requests from the browser or Node.js. It simplifies the process of sending asynchronous requests and handling responses.morgan
: Morgan is a logging middleware for Node.js HTTP servers. It simplifies the process of logging HTTP requests and responses, including request method, URL, response status, and response time.body-parser
: Body-parser is a Node.js middleware used to parse incoming request bodies in a middleware before the handlers. It extracts the entire body portion of an incoming request stream and exposes it onreq.body
.mongoose
: Mongoose is an Object-Document Mapping (ODM) library for MongoDB and Node.js. It provides a higher-level abstraction for connecting/interacting with MongoDB databases, allowing the definition of schemas, models, and perform database operations using a more intuitive API.mongoDB
: MongoDB is a popular NoSQL database that stores data in flexible, JSON-like documents. It provides scalability, flexibility, and performance for handling large volumes of data and is commonly used for web applications and other data-intensive projects.
Step-by-step instructions on how to install and set up the project. Include any dependencies, libraries, or specific configurations required.
- Clone the repository
$ git clone https://github.com/ra-im/ejs-user_management-crud_application.git
$ cd ejs-user_management-crud_application
- Install the dependencies:
npm install
- Configure the environment variables
- Create a
.env
file in the root directory of the application. - Within the
.env
file, there are two variables, thePORT
variable and theMONGO_URI
variable. - set
PORT=3000
, andMONGO_URI=your_mongodb_api_key
.
-
Replace all urls in the
assets/js/index.js
andserver/services/render.js
files tohttp://localhost:3000/api/users
(taking note of theid
variables where indicated) -
Start the application:
npm start
- View the list of users.
- Update user details.
- Delete user accounts.
- Add new users by providing the necessary information.
'/'
: Home route/page'/add-user'
: Add user'/update-user'
: Update user
Contributions are welcome! Follow these steps to contribute:
- Fork the project.
- Create a new branch.
- Make your changes.
- Commit and push your changes.
- Create a pull request.
This project is licensed under the ISC.