Giter Site home page Giter Site logo

fullstackopen-part3-backend's Introduction

Phonebook - SPA

This project is a single-page application that holds both the frontend (react-app) and backend (express + mongoose) sides using the express web framework.

๐Ÿ‘‰๐Ÿป The application is accessible via Heroku: https://fullstackopen-p3-phonebook.herokuapp.com/

The data is kept in a Mongo DB instance located in a MongoDB Atlas.

NOTE 1: In order to apply any frontend changes in this server, you need to git clone [email protected]:sergioruizsan/fullstackopen.git the main repo. The frontend code is located under https://github.com/sergioruizsan/fullstackopen/tree/main/part3/phonebook

NOTE 2: To deploy the app to heroku, there is at least one environment variable reqiured, the one for the connection. Checkout the .env.sample for the variables needed. Setting the Mongo DB URI env variable can be done through the heroku CLI with the following command: heroku config:set MONGODB_URI='mongodb+srv://<user>:<password>@cluster0.abwvbql.mongodb.net/personApp?retryWrites=true&w=majority'

Available Endpoints

If you have the VSCode REST Client, you can trigger the requests from the file located in requests/persons.rest

Available Scripts

In the project directory, you can run:

npm run start

Starts the express server in production mode

npm run dev

Starts the express server in development mode, using nodemon to restart the server automatically whenever there are any changes in the backend code.

npm run build:ui

Generates the production build for the frontend. The main repository is required to succesfully run this command, as mentioned earlier.

npm run deploy

Deploys the application to Heroku

npm run deploy:full

Runs both npm run build:ui and npm run deploy. The main repository is required to succesfully run this command, as mentioned earlier.

npm run logs:prod

Shows the heroku logs

npm run lint

Run eslint

fullstackopen-part3-backend's People

Contributors

sergioruizsan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.