Este projeto foi desenvolvido com o intuito de praticar alguns conhecimentos em Node.js, Express, MongoDB e JavaScript. A aplicação é uma agenda de contatos, onde é possível cadastrar, listar, atualizar e deletar contatos. A aplicação também conta com um sistema de autenticação, onde é possível realizar o cadastro de usuários, login e logout onde as informações são armazenadas no banco de dados.
- Sobre o Projeto
- Imagem da Aplicação
- Tecnologias Utilizadas
- Como Rodar o Projeto
- Funcionalidades
- Próximos Passos
- Contribuições
- Autor
- Contatos
- Licença
- Node.js
- Express
- MongoDB
- JavaScript
- CSS
- EJS
- Clone o repositório utilizando
git clone https://github.com/Guihsp/agenda-contatos.git
. Você também pode baixar o arquivo .zip do projeto. - Instale as dependências com
npm install
ouyarn install
. - Crie um arquivo
.env
na raiz do projeto e adicione as variáveis de ambiente conforme o arquivo.env.example
. Você precisará de uma conta no MongoDB Atlas para obter a URL de conexão com o banco de dados. - Rode o projeto com
npm start
ouyarn start
. O servidor estará rodando na porta 3000. Você pode alterar a porta no arquivoserver.js
no seguinte trecho de código:
app.on('pronto', () => { // Inicia o servidor na porta 3000 e imprime uma mensagem no console após o servidor ser iniciado app.listen(3000, () => { console.log('Acessar http://localhost:3000'); console.log('Servidor executando na porta 3000'); }); });
- Acesse
http://localhost:3000
no seu navegador. Você será redirecionado para a página de login. Caso não tenha uma conta, clique em "Cadastrar-se" para criar uma conta.
- Cadastro de usuários
- Login
- Logout
- Cadastro de contatos
- Listagem de contatos
- Atualização de contatos
- Deleção de contatos
- Adicionar validações de formulários no front-end
Contribuições são sempre bem-vindas! Caso queira contribuir com o projeto, siga os passos abaixo:
- Faça um fork do projeto
- Crie uma nova branch com a sua feature (
git checkout -b feature/nome-da-feature
) - Faça um commit das suas alterações (
git commit -m 'Adiciona uma nova feature'
) - Faça um push para a sua branch (
git push origin feature/nome-da-feature
) - Abra um pull request
Este projeto está sob a licença MIT. Veja o arquivo LICENSE para mais detalhes.
This project was developed with the aim of practicing some knowledge in Node.js, Express, MongoDB, and JavaScript. The application is a contact agenda, where it is possible to register, list, update, and delete contacts. The application also has an authentication system, where it is possible to register users, login, and logout where the information is stored in the database.
- About the Project
- Application Image
- Technologies Used
- How to Run the Project
- Features
- Next Steps
- Contributions
- Author
- Contacts
- License
- Node.js
- Express
- MongoDB
- JavaScript
- CSS
- EJS
- Clone the repository using
git clone https://github.com/Guihsp/contact-agenda.git
. You can also download the .zip file of the project. - Install the dependencies with
npm install
oryarn install
. - Create a
.env
file at the root of the project and add the environment variables as per the.env.example
file. You will need a MongoDB Atlas account to get the database connection URL. - Run the project with
npm start
oryarn start
. The server will be running on port 3000. You can change the port in theserver.js
file in the following code snippet:
app.on('ready', () => { // Starts the server on port 3000 and prints a message on the console after the server has started app.listen(3000, () => { console.log('Access http://localhost:3000'); console.log('Server running on port 3000'); }); });
- Access
http://localhost:3000
in your browser. You will be redirected to the login page. If you do not have an account, click on "Register" to create an account.
- User registration
- Login
- Logout
- Contact registration
- Contact listing
- Contact update
- Contact deletion
- Add form validations on the front-end
Contributions are always welcome! If you want to contribute to the project, follow the steps below:
- Fork the project
- Create a new branch with your feature (
git checkout -b feature/feature-name
) - Commit your changes (
git commit -m 'Add a new feature'
) - Push to your branch (
git push origin feature/feature-name
) - Open a pull request
This project is under the MIT license. See the LICENSE file for more details.