Git Product home page Git Product logo

homeworked-backend-ts's Introduction

Backend (NodeJS with TypeScript) to the HomeWorked, frontend found here: https://github.com/ParadigmZero/HomeWorkedFrontend

In progress.

This is a re-working of the original C# .NET Core project, it is designed to do exactly the same thing: https://github.com/ParadigmZero/HomeWorkedBackend

Plus some added quality of life features for developers.

S3 bucket and object setup info here: https://github.com/ParadigmZero/homeworked-terraform-iac

Setup

Node/npm must be installed first.

( Optional: recommended to have Node Version Manager installed, so you can run the following step: nvm use )

Install all the necessary packages (from project root directory)

npm i

Running

npm run start

or for development (watches code changes with Nodemon):

npm run dev

By default it will accessible at:

http://localhost:7012

API docs/testing

API docs will be at:

<HOST>/api

Database info

Local Docker database setup

A local PostgreSQL database and sample data can be spun up with Docker. You will need Docker installed.

Spin up database container and entry sample data (see ./db/dump.sql):

npm run dbup

Spin-down database container:

npm run dbdown

If in need of an additional tool you can uncomment adminer in the docker-compose.yaml and use it to explore the Docker database.

Setting up environmental variables for another database source

If using the local Docker database you do not need to do anything extra, as the connection info is contained in the .env.defaults file. If you are using another source, create a .env file and over-ride the defaults as needed (use .env.defaults as your guide).

Tips for setting up your database from another source

If you want to setup up your own database use ./db/dump.sql for assistance on making the correct tables within your database.

I have used a free tier of ElephantSQL for deployment. If you also choose to use this service here are some tips on getting the correct data:

HOST= DATABASE=<default database, same value as user> PORT=5432

On the ElephantSQL portal you can easily use the "BROWSER" to setup your database (and query it directly) .

homeworked-backend-ts's People

Contributors

paradigmzero 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.