Skip to content

Commit 5985627

Browse files
committed
Move from monorepo
0 parents  commit 5985627

36 files changed

+6723
-0
lines changed

.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"plugins": ["@babel/plugin-proposal-class-properties"],
3+
"presets": [
4+
["@babel/preset-env", {
5+
"targets": {
6+
"node": "current"
7+
}
8+
}]
9+
]
10+
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.eslintrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": ["airbnb-base", "prettier"],
4+
"plugins": ["prettier"],
5+
"env": {
6+
"node": true,
7+
"es6": true,
8+
"mocha": true
9+
},
10+
"rules": {
11+
"no-return-await": "off",
12+
"no-shadow": "off",
13+
"no-param-reassign": "off",
14+
"import/no-mutable-exports": "off",
15+
"consistent-return": "off",
16+
"dot-notation":"off",
17+
"import/no-extraneous-dependencies": "off",
18+
"import/prefer-default-export": "off"
19+
}
20+
}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
dist/
3+
.DS_Store
4+
.env
5+
uploads/
6+
lerna-debug.log
7+
yarn-error.log
8+
9+
.next/
10+
.build/

.graphqlconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"schemaPath": "/packages/backend/src/schema.graphql",
3+
"extensions": {
4+
"endpoints": {
5+
"dev": "http://localhost:4000",
6+
"prod": "https://shortstories.io"
7+
}
8+
}
9+
}

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"trailingComma": "es5",
7+
"bracketSpacing": true,
8+
"parser": "babylon"
9+
}

package.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "backend",
3+
"version": "1.0.0",
4+
"description": "GraphQL API for shortstories",
5+
"main": "src/index.js",
6+
"repository": "https://github.com/shortstories-project/shortstories",
7+
"keywords": [
8+
"graphql",
9+
"express",
10+
"apollo",
11+
"postgresql"
12+
],
13+
"author": "Shashkov Danil <[email protected]> (https://github.com/shashkovdanil)",
14+
"license": "MIT",
15+
"scripts": {
16+
"start:dev": "nodemon -e js,graphql -x babel-node src/index.js",
17+
"test-server": "TEST_DATABASE_URL=postgres://[email protected]:5432/shortstories_test yarn start",
18+
"test": "mocha --timeout 10000 --require @babel/register 'src/**/*.spec.js'",
19+
"lint:js": "eslint src/ --fix"
20+
},
21+
"dependencies": {
22+
"apollo-server": "^2.2.2",
23+
"bcryptjs": "^2.4.3",
24+
"body-parser": "^1.18.3",
25+
"chalk": "^2.4.1",
26+
"cookie-parser": "^1.4.3",
27+
"dataloader": "^1.4.0",
28+
"dotenv": "^6.1.0",
29+
"express": "^4.16.4",
30+
"gm": "^1.23.1",
31+
"graphql": "^14.0.2",
32+
"graphql-resolvers": "^0.2.2",
33+
"graphql-tag": "^2.10.0",
34+
"graphql-yoga": "^1.16.7",
35+
"jsonwebtoken": "^8.4.0",
36+
"lodash.last": "^3.0.0",
37+
"nanoid": "^2.0.0",
38+
"nodemailer": "^4.7.0",
39+
"pg": "^7.7.1",
40+
"ramda": "^0.26.1",
41+
"sequelize": "^5.0.0-beta.15"
42+
},
43+
"devDependencies": {
44+
"@babel/cli": "^7.1.5",
45+
"@babel/core": "^7.1.6",
46+
"@babel/node": "^7.0.0",
47+
"@babel/plugin-proposal-class-properties": "^7.1.0",
48+
"@babel/preset-env": "^7.1.6",
49+
"@babel/register": "^7.0.0",
50+
"axios": "^0.18.0",
51+
"babel-eslint": "^10.0.1",
52+
"chai": "^4.2.0",
53+
"eslint": "^5.9.0",
54+
"eslint-config-airbnb-base": "^13.1.0",
55+
"eslint-config-prettier": "^3.3.0",
56+
"eslint-import-resolver-node": "^0.3.2",
57+
"eslint-plugin-import": "^2.14.0",
58+
"eslint-plugin-node": "^8.0.0",
59+
"eslint-plugin-prettier": "^3.0.0",
60+
"eslint-plugin-promise": "^4.0.1",
61+
"mocha": "^5.2.0",
62+
"nodemon": "^1.18.6",
63+
"prettier": "^1.15.2",
64+
"winston": "^3.1.0"
65+
}
66+
}

sample.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
NODE_ENV=env
2+
FRONTEND_URL=url
3+
DATABASE_URL=postgres://user:password@host:port/name
4+
SECRET=secret
5+
6+
GOOGLE_AUTH_CLIENT_ID=id
7+
GOOGLE_AUTH_SECRET=secret
8+
GOOGLE_AUTH_REFRESH_TOKEN=token
9+
GOOGLE_AUTH_ACCESS_TOKEN=token

src/constants/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const LIKE = 'like'
2+
export const DISLIKE = 'dislike'
3+
export const DEFAULT_PHOTO = '/img/assets/default.jpg'
4+
export const SENDER_EMAIL = '[email protected]'
5+
export const API_URL = 'http://localhost:8000/graphql'

src/constants/templates.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export const resetPassword = link => `
2+
3+
Hey there!
4+
5+
Someone requested a new password for your Shortstories account.
6+
7+
Please click on the following link to complete the process:
8+
9+
${link}
10+
11+
If you didn't make this request then you can safely ignore this email :)
12+
13+
`
14+
15+
export const emailConfirmation = link => `
16+
17+
Welcome to Shortstories!
18+
19+
Verify we have the right email address by clicking on the link below:
20+
21+
${link}
22+
23+
Thank you!
24+
25+
`

0 commit comments

Comments
 (0)