minor formatting
This commit is contained in:
parent
d9e616a469
commit
cbff40e65e
|
@ -1,27 +1,27 @@
|
|||
const config = {
|
||||
domain: process.env.DOMAIN || '127.0.0.1', // Or for example 'teddit.net'
|
||||
use_reddit_oauth: process.env.USE_REDDIT_OAUTH === "true" || false, // If false, teddit uses Reddit's public API. If true, you need to have your own Reddit app ID (enter the app ID to the "reddit_app_id" config key).
|
||||
use_reddit_oauth: process.env.USE_REDDIT_OAUTH === 'true' || false, // If false, teddit uses Reddit's public API. If true, you need to have your own Reddit app ID (enter the app ID to the "reddit_app_id" config key).
|
||||
cert_dir: process.env.CERT_DIR || '', // For example '/home/teddit/letsencrypt/live/teddit.net', if you are using https. No trailing slash.
|
||||
theme: process.env.THEME || 'dark', // One of: 'dark', ''
|
||||
flairs_enabled: process.env.FLAIRS_ENABLED !== "true" || true, // Enables the rendering of user and link flairs on teddit
|
||||
api_enabled: process.env.API_ENABLED !== "true" || true, // Teddit API feature. Might increase loads significantly on your instance.
|
||||
video_enabled: process.env.VIDEO_ENABLED !== "true" || true,
|
||||
redis_enabled: process.env.REDIS_ENABLED !== "true" || true, // If disabled, does not cache Reddit API calls
|
||||
flairs_enabled: process.env.FLAIRS_ENABLED !== 'true' || true, // Enables the rendering of user and link flairs on teddit
|
||||
api_enabled: process.env.API_ENABLED !== 'true' || true, // Teddit API feature. Might increase loads significantly on your instance.
|
||||
video_enabled: process.env.VIDEO_ENABLED !== 'true' || true,
|
||||
redis_enabled: process.env.REDIS_ENABLED !== 'true' || true, // If disabled, does not cache Reddit API calls
|
||||
redis_host: process.env.REDIS_HOST || '127.0.0.1',
|
||||
redis_port: process.env.REDIS_PORT || 6379,
|
||||
ssl_port: process.env.SSL_PORT || 8088,
|
||||
nonssl_port: process.env.NONSSL_PORT || 8080,
|
||||
listen_address: process.env.LISTEN_ADDRESS || '0.0.0.0',
|
||||
https_enabled: process.env.HTTPS_ENABLED === "true" || false,
|
||||
redirect_http_to_https: process.env.REDIRECT_HTTP_TO_HTTPS === "true" || false,
|
||||
redirect_www: process.env.REDIRECT_WWW === "true" || false,
|
||||
use_compression: process.env.USE_COMPRESSION !== "true" || true,
|
||||
use_view_cache: process.env.USE_VIEW_CACHE === "true" || false,
|
||||
use_helmet: process.env.USE_HELMET === "true" || false, // Recommended to be true when using https
|
||||
use_helmet_hsts: process.env.USE_HELMET_HSTS === "true" || false, // Recommended to be true when using https
|
||||
trust_proxy: process.env.TRUST_PROXY === "true" || false, // Enable trust_proxy if you are using reverse proxy like nginx
|
||||
https_enabled: process.env.HTTPS_ENABLED === 'true' || false,
|
||||
redirect_http_to_https: process.env.REDIRECT_HTTP_TO_HTTPS === 'true' || false,
|
||||
redirect_www: process.env.REDIRECT_WWW === 'true' || false,
|
||||
use_compression: process.env.USE_COMPRESSION !== 'true' || true,
|
||||
use_view_cache: process.env.USE_VIEW_CACHE === 'true' || false,
|
||||
use_helmet: process.env.USE_HELMET === 'true' || false, // Recommended to be true when using https
|
||||
use_helmet_hsts: process.env.USE_HELMET_HSTS === 'true' || false, // Recommended to be true when using https
|
||||
trust_proxy: process.env.TRUST_PROXY === 'true' || false, // Enable trust_proxy if you are using reverse proxy like nginx
|
||||
trust_proxy_address: process.env.TRUST_PROXY_ADDRESS || '127.0.0.1',
|
||||
nsfw_enabled: process.env.NSFW_ENABLED !== "true" || true, // Enable NSFW (over 18) content. If false, a warning is shown to the user before opening any NSFW post. When the NFSW content is disabled, NSFW posts are hidden from subreddits and from user page feeds. Note: Users can set this to true or false from their preferences.
|
||||
nsfw_enabled: process.env.NSFW_ENABLED !== 'true' || true, // Enable NSFW (over 18) content. If false, a warning is shown to the user before opening any NSFW post. When the NFSW content is disabled, NSFW posts are hidden from subreddits and from user page feeds. Note: Users can set this to true or false from their preferences.
|
||||
post_comments_sort: process.env.POST_COMMENTS_SORT || 'confidence', // "confidence" is the default sorting in Reddit. Must be one of: confidence, top, new, controversial, old, random, qa, live.
|
||||
reddit_app_id: process.env.REDDIT_APP_ID || 'ABfYqdDc9qPh1w', // If "use_reddit_oauth" config key is set to true, you have to obtain your Reddit app ID. For testing purposes it's okay to use this project's default app ID. Create your Reddit app here: https://old.reddit.com/prefs/apps/. Make sure to create an "installed app" type of app.
|
||||
setexs: {
|
||||
|
|
|
@ -25,9 +25,6 @@ module.exports = function() {
|
|||
posts_limit = json.data.children.length
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for(var i = 0; i < posts_limit; i++) {
|
||||
let post = json.data.children[i].data
|
||||
let post_id = post.permalink.split('/').slice(-2)[0] + '/'
|
||||
|
|
Loading…
Reference in New Issue