Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sara-tustra committed May 3, 2021
0 parents commit db162a9
Show file tree
Hide file tree
Showing 51 changed files with 14,450 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file includes global variables that will be available inside your project
# 1. In the front end code you can access this variables like this: console.log(process.env.VARIABLE_NAME)
# 1. In the back end code you access the variable by importing os and then typing print(os.getEnv('VARIABLE_NAME'))

# Back-End Variables
DATABASE_URL=postgresql://gitpod@localhost:5432/example
FLASK_APP_KEY="any key works"
FLASK_APP=src/app.py
FLASK_ENV=development

# Front-End Variables
BASENAME=/
31 changes: 31 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parser": "babel-eslint",
"plugins": [
"react"
],
"env": {
"browser": true,
"es6": true
},
"extends": [ "plugin:react/recommended"],
"rules": {
"strict":0,
"no-unused-vars": 0,
"no-console": 1,
"no-mixed-spaces-and-tabs": 0,
"no-debugger": 0,
"semi": ["error", "always"],
"allowImportExportEverywhere": false,
"indent": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"comma-dangle": [1, { //when to use the last comma
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "ignore",
}],
"react/prop-types": [2]
}
}
27 changes: 27 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repository:
has_wiki: false

# Labels: define labels for Issues and Pull Requests
labels:
- name: "bug"
color: c10000
- name: ":nerd_face: 4geeks student"
color: 7057ff
- name: "enhancement"
color: a2eeef
- name: "first-timers-only"
color: 69db89
- name: "good first issue"
color: 7057ff
- name: "help wanted"
color: 008672
- name: ":star: P1"
color: fbca04
- name: ":star: P2"
color: fbca04
- name: ":memo: bc-writter"
color: 98bde2
- name: ":computer: bc-coder"
color: 98bde2
- name: ":beetle: bc-inspector"
color: 98bde2
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# ignore all files starting with .
.*

# track this file .gitignore (i.e. do NOT ignore it)
!.gitignore
!.github
php_errorlog
.log

# do not ignore gitpod files
!.gitpod.Dockerfile
!.gitpod.yml

# track webpack configs (i.e. do NOT ignore it)
!composer.json
!webpack.config.js
!package.json
!webpack.production.js
!webpack.development.js

# track readme.md in the root (i.e. do NOT ignore it)
!README.md

# ignore OS generated files
ehthumbs.db
Thumbs.db

# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject

# ignore log files and databases
*.log
*.sql
*.sqlite

# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so

# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# ignore node/grunt dependency directories
node_modules/

# webpack output
dist/*
public/

# ignore the dist directory were our bundle files are going to be
!.gitkeep
!.htaccess
!.eslintrc
!.env.example
.now

# backend stuff
.venv
database.database
database.db
diagram.png
__pycache__/
3 changes: 3 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM gitpod/workspace-postgres

RUN npm i heroku -g
25 changes: 25 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

image:
file: .gitpod.Dockerfile
ports:
- port: 3000
onOpen: open-browser
- port: 3001
onOpen: open-preview
- port: 5432
onOpen: ignore
tasks:
- init: >
(cp -n .env.example .env || true) &&
echo "" >> .env && echo "BACKEND_URL=https://3001-${GITPOD_WORKSPACE_URL:8}" >> .env &&
pipenv install &&
psql -U gitpod -c 'CREATE DATABASE example;' &&
psql -U gitpod -c 'CREATE EXTENSION unaccent;' -d example &&
pipenv run init &&
pipenv run migrate &&
pipenv run upgrade &&
python docs/assets/greeting.py back
- command: >
npm install &&
python docs/assets/greeting.py front
openMode: split-right
Binary file added 4geeks.ico
Binary file not shown.
31 changes: 31 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
flask = "*"
sqlalchemy = "*"
flask-sqlalchemy = "*"
flask-migrate = "*"
flask-swagger = "*"
psycopg2-binary = "*"
python-dotenv = "*"
flask-cors = "*"
gunicorn = "*"
cloudinary = "*"
flask-admin = "*"

[requires]
python_version = "3.8"

[scripts]
start="flask run -p 3001 -h 0.0.0.0"
init="flask db init"
migrate="flask db migrate"
local="heroku local"
upgrade="flask db upgrade"
reset_db="bash ./docs/assets/reset_migrations.bash"
deploy="echo 'Please follow this 3 steps to deploy: https://github.com/4GeeksAcademy/flask-rest-hello/blob/master/README.md#deploy-your-website-to-heroku' "
Loading

0 comments on commit db162a9

Please sign in to comment.