Git Product home page Git Product logo

osome's Introduction

server

The server is written on ExpressJS, and should be a REST API. There won't be views served, but it's possible that assets, such as manifests, images, etc may still need to be served.

Responses should be in JSON format whenever possible.

Packages Used

  • Model creation and maintenance: MongooseJS

  • Auth using Google and JWT

  • Image manipulation: Sharp

  • Image Storage in AWS: AWS-SDK

  • Form Multipart Handling: Multer

Setup

Node

The project currently runs on Node 12.

Instructions can be found here: https://formulae.brew.sh/formula/node@12

brew

brew install node@18

# Note: After this, you may need to update your PATH. Keep an eye on the output of brew.
# Example Output:
# If you need to have node@12 first in your PATH, run:
#  echo 'export PATH="/usr/local/opt/node@12/bin:$PATH"' >> ~/.zshrc

Database

We're using MongoDB.

Database Explorer

To explore it, you can use the Robot 3T application:

https://robomongo.org/download

Extensions

VS Code Extensions

Running the Project

Install Dependencies

# From within the server directory
npm install

Additionally, the project runs a local dockerfile to minimize the installation requirements and ensure cross system compatibility.

Project Configurations

Create a local.json file inside the config folder:

{
    "oauth": {
        "google": {
            "client_id": "<google client id>",
            "client_secret": "<google client secret>",
            "callback_url": "http://localhost:3001/google/callback"
        }
    }
}

Credentials can be found in the Google App.

Startup

Scripts can be found in the package.json file

Normal startup

docker-compose up --build

Application then runs on http://localhost:3001 by default. The port can be changed overriding the local.json file, however, any client will also need to be updated.

To test that things are running correctly, navigate to your local oath link and after you select an account, you should see a log in your console that your account was created.

osome's People

Contributors

roloenusa avatar hchow77 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.