twetlix / nestjs-react-graphql-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA Fullstack Web App boilerplate based on these bad boys, GraphQL / Postgresql / Nestjs / React
License: MIT License
A Fullstack Web App boilerplate based on these bad boys, GraphQL / Postgresql / Nestjs / React
License: MIT License
This boilerplate is NOT for a beginner developer as that it requires a general knowledge of GraphQL, TypeScript, Nestjs and GraphQL
As you can see GraphQL appears twice. You wanted to say React instead i guess.
Firstly, I would like to say, awesome repo. I think I am going to use this for my next project.
However, I just cloned your repo, and upon running the yarn dev
command, I am receiving an error about there being no .env.development
file.
That's all good and well, considering you shouldn't check in such files to source control, but you didn't document your environment variables or include a .env.example
file for users to recreate the file.
Could you please update your README.md
to make note of the needed environment variables and or include various .env.example
files?
I even have a script below that will help you generate the .env.example
file that you can use in a pre-commit
hook
Error: ENOENT: no such file or directory, open '.env.development'
I believe in your repo, you have specific .env
files, but because of your .gitignore
, none of these files ever made it.
See your .gitignore
:
# dotenv environment variables file
.env
.env.test
.env.*
Include an .env.example
file, or multiple files (i.e. .env.development.example
, .env.test.example
, .env.production.example
documenting the environment variables you are using.
For example, the .env.example
could look like the following:
SOME_VAR=""
ANOTHER_VAR=""
SOME_OTHER_VAR=""
Document in your README.md
that you have such environment variables and that you need to create these .env
files for the repo to work
The below script will generate a .env.example
file given an input .env
file.
#! /bin/sh
# Script to generate .env.example
# Remove the values from env vars in .env except for PORT and SOME_VAR
sed -r '/(PORT|SOME_VAR)=.*/!s/(.*\=\")(.*)(\")/\1\3/g' .env >.env.example
The script will remove the values of the variables, except those environment variables you include at the begging of the script.
In the script, all values will be removed except for PORT
and SOME_VAR
.
For example, if this was your .env
file:
PORT="4000"
SOME_VAR="some value"
API_KEY="123456789"
REDIRECT_URL="https://www.google.com"
The script will turn it into:
PORT="4000"
SOME_VAR="some value"
API_KEY=""
REDIRECT_URL=""
The reasoning is that you want to hide some environment variables, but you want others to be known.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.