Skip to content

allanrolli/desafiobossa

Repository files navigation

desafiobossa

desafiobossa Documentation Heroku App Status

This project has the purpose of documentation to be inserted in my portfolio.

You can authenticate a user like a login, create users, list all of them, create, list and delete the tools.

👨🏾‍🏫 Documentation

The documentation can be accessed in desafiobossa Documentation

🚀 Technologies

ℹ️ How To Use

To clone and run this application, you'll need Git, Node.js v12.17 or higher + Npm v6.10.2 or higher installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/AllanRolli/desafiobossa.git

# Go into the repository
$ cd desafiobossa

# Install dependencies
$ npm install

MongoDB

MongoDB script

I create a script in mongo language to populate the database, inside the folder src/config you can check the code, need only to change the MONGO_URL to your connection string

MongoDB config

You have to create an account in MongoDB, after logged, create a free cluster, click in Collections and Create Database. Return in your cluster click in "connect" and in "Connect your application", copy the string and create a .env and a .env.test file inside the directory with a variable MONGO_URL=<<your_copy_string>>

# Run the app in Development Environment
$ npm run dev

# Run the app in Production Environment
$ npm start

⚠️ Running Tests

# Inside the directory desafiobossa
$ npm test

Deploying

Deploying on Heroku

Click the button below to automatically set up the desafiobossa API in an app running on your Heroku account.

Deploy to Heroku

Once you've deployed, you can easily clone the application and alter the configuration to disable features:

$ heroku clone -a new-app-name
$ heroku config:set POLLS_CAN_VOTE_QUESTION=false
$ heroku config:set POLLS_CAN_CREATE_QUESTION=false
$ heroku config:set POLLS_CAN_DELETE_QUESTION=false

Remember that have to insert the MONGO_URL in heroku config vars to use your application.

Deploying on Heroku using Docker

If you'd like to, you may use Docker on Heroku instead. I created a Dockerfile to build an image in the root of the repository.Refer to the Heroku Container Registry and Runtime Guide for detailed instructions. Providing you have Docker installed you can follow the following steps:

$ heroku container:login
$ heroku container:push web --app=name_of_your_app
$ heroku container:release web --app=name_of_your_app

📝 License

This project is under the MIT license. See the LICENSE for more information.


Author

👤 Allan Rolli

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •