mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
db pool, tweaks for usernames on browse
This commit is contained in:
parent
58108ef643
commit
f26797f5c9
3 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
development:
|
development:
|
||||||
database: 'postgres://localhost/neocities'
|
database: 'postgres://localhost/neocities'
|
||||||
|
database_pool: 1
|
||||||
session_secret: SETSOMETHINGHERE
|
session_secret: SETSOMETHINGHERE
|
||||||
recaptcha_public_key: ddsfsdfsdf
|
recaptcha_public_key: ddsfsdfsdf
|
||||||
recaptcha_private_key: fsdgfdsdfd
|
recaptcha_private_key: fsdgfdsdfd
|
||||||
phantomjs_url: http://localhost:40000
|
phantomjs_url: http://localhost:40000
|
||||||
|
|
|
@ -14,7 +14,7 @@ Bundler.require :development if ENV['RACK_ENV'] == 'development'
|
||||||
|
|
||||||
$config = YAML.load_file(File.join(DIR_ROOT, 'config.yml'))[ENV['RACK_ENV']]
|
$config = YAML.load_file(File.join(DIR_ROOT, 'config.yml'))[ENV['RACK_ENV']]
|
||||||
|
|
||||||
DB = Sequel.connect $config['database'], sslmode: 'disable'
|
DB = Sequel.connect $config['database'], sslmode: 'disable', max_connections: $config['database_pool']
|
||||||
|
|
||||||
Dir.glob('workers/*.rb').each {|w| require File.join(DIR_ROOT, "/#{w}") }
|
Dir.glob('workers/*.rb').each {|w| require File.join(DIR_ROOT, "/#{w}") }
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
.span1
|
.span1
|
||||||
h5
|
h5
|
||||||
b style="margin-left: 20px"
|
b style="margin-left: 20px"
|
||||||
- if site.username.length > 17
|
- if site.username.length > 14
|
||||||
a href="http://#{site.username}.neocities.org" target="_blank" rel="tooltip" title="#{site.username}" = site.username[0..17]+'..'
|
a href="http://#{site.username}.neocities.org" target="_blank" rel="tooltip" title="#{site.username}" = site.username[0..14]+'..'
|
||||||
- else
|
- else
|
||||||
a href="http://#{site.username}.neocities.org" target="_blank" = site.username
|
a href="http://#{site.username}.neocities.org" target="_blank" = site.username
|
||||||
|
|
||||||
|
@ -42,4 +42,4 @@ javascript:
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("[rel='tooltip']").tooltip();
|
$("[rel='tooltip']").tooltip();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue