These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before we get started, we're going to need to make sure we have a few things installed and available on our machine.
Use the installation guide from here:
https://www.docker.com/products/docker-desktop
curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
See the installation guides available @ nodejs.org:
https://nodejs.org/en/download/package-manager/
Below is a series of step by step instructions that tell you how to get a development env running.
Create a local clone of the repository
git clone git@github.com:2wce/prisma-template.git
Enter the cloned repositories' directory
cd prisma-template
Create a .env
file based on the .env.example template
If you have a local MySQL database you can use it's details in the .env
file. If not, you can run the docker container & use it's default values.
docker compose up -d
Export the contents of the created .env
file to the current terminal session.
set -o allexport; source .env; set +o allexport
Install the projects dependencies
npm i
Start the projects development server
yarn dev
The project should now be available at http://localhost:4000
Start the db viewer in another terminal to view your database
npx prisma studio
You can run local tests using
yarn test
You can find the example flow & queries in here: ExampleFlow.md
Deployments are handled by github actions, below is an overview of how the deployments work:
- Dependencies are installed with
npm i
- Unit tests are run with
yarn test
These are the environment variables required to successfully deploy the application.
key | description |
---|---|
DATABASE_URL | DB url |
Details of the tech stack that has been used.
- Typescript - TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
- Prisma - Next-generation ORM for Node.js and TypeScript
This project uses SemVer for versioning. Versioning occurs automatically in the pipelines using Semantic Release. For the versions available, see the tags on this repository.
A running changelog can be found here: CHANGELOG.md
- Kudakwashe Mupeni kudamupeni@gmail.com
├─ MIT: 386
├─ ISC: 32
├─ BSD-3-Clause: 30
├─ Apache-2.0: 11
├─ BSD-2-Clause: 7
├─ CC-BY-4.0: 1
├─ (MIT AND BSD-3-Clause): 1
├─ 0BSD: 1
└─ (MIT OR CC0-1.0): 1
Version | Author | Date |
---|---|---|
0.0.1 | Kudakwashe Mupeni kudamupeni@gmail.com | 20/09/2021 |
0.0.2 | Kudakwashe Mupeni kudamupeni@gmail.com | 21/09/2021 |