Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Use dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Feb 25, 2019
1 parent c948e35 commit 0875c82
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 12 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ To be a bit more specific:
5. Lastly, you'll need a route somewhere to catch redirections and tokens from Accownt after each successful login. You set this already in your config.
6. Optionally, you can also add a link somewhere that takes _authenticated_ users to Accownt so they can modify their account information, like their password or 2FA.

## Docker

Docker support is currently being added. You should use the Dockerfiles within the server and web directories to run containers using the .env files. See the docker-compose.yml for a (development environment) example.

# Screenshots

<img src="https://i.imgur.com/eoN4kg1.png" alt="Login screenshot" height="400px" />
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accownt",
"version": "6.0.0-alpha.2",
"version": "6.0.0-alpha.3",
"description": "Dead simple user account system so easy a cow could do it.",
"main": "index.js",
"bin": {
Expand All @@ -10,8 +10,8 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"accownt-server": "6.0.0-alpha.2",
"accownt-web": "6.0.0-alpha.2"
"accownt-server": "6.0.0-alpha.3",
"accownt-web": "6.0.0-alpha.3"
},
"prettier": {
"singleQuote": true
Expand Down
3 changes: 3 additions & 0 deletions server/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'app-module-path/register';
import { config } from 'dotenv';
config();
import 'enve';

import { verifyRequestJWT } from 'lib/jwt/verify';
import * as cookieParser from 'cookie-parser';
import * as bodyParser from 'body-parser';
Expand Down
16 changes: 15 additions & 1 deletion server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accownt-server",
"version": "6.0.0-alpha.2",
"version": "6.0.0-alpha.3",
"description": "Dead simple user account system so easy a cow could do it.",
"main": "dist/app.js",
"scripts": {
Expand All @@ -24,6 +24,7 @@
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"cookie-parser": "^1.4.3",
"dotenv": "^6.2.0",
"enve": "^1.0.0",
"express": "^4.16.4",
"jsonwebtoken": "^8.4.0",
Expand All @@ -35,6 +36,7 @@
"devDependencies": {
"@types/bcryptjs": "^2.4.2",
"@types/cookie-parser": "^1.4.1",
"@types/dotenv": "^6.1.0",
"@types/jest": "^23.3.14",
"@types/jsonwebtoken": "^8.3.0",
"@types/node-persist": "0.0.33",
Expand Down
3 changes: 3 additions & 0 deletions server/tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { config } from 'dotenv';
config();
import 'enve';

import { finishPasswordlessLogin } from 'lib/login/passwordless/finish';
import { startPasswordlessLogin } from 'lib/login/passwordless/start';
import { finishRegistration } from 'lib/register/finish';
Expand Down
22 changes: 21 additions & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accownt-web",
"version": "6.0.0-alpha.2",
"version": "6.0.0-alpha.3",
"description": "Dead simple user account system so easy a cow could do it.",
"main": "",
"scripts": {
Expand All @@ -17,6 +17,7 @@
"dependencies": {
"@material-ui/core": "^3.9.2",
"axios": "^0.18.0",
"dotenv": "^6.2.0",
"enve": "^1.0.0",
"react": "^16.8.1",
"react-dom": "^16.8.1",
Expand All @@ -29,6 +30,7 @@
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"@types/dotenv": "^6.1.0",
"@types/react": "^16.8.2",
"@types/react-dom": "^16.8.0",
"babel-loader": "^8.0.5",
Expand Down
4 changes: 3 additions & 1 deletion web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require('dotenv').config();
require('enve');

const CompressionPlugin = require('compression-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const path = require('path');
require('enve');

module.exports = {
mode: process.enve.NODE_ENV,
Expand Down

0 comments on commit 0875c82

Please sign in to comment.