Coder Social home page Coder Social logo

subdirectories about vash-express-example HOT 6 OPEN

Dovernh avatar Dovernh commented on August 18, 2024
subdirectories

from vash-express-example.

Comments (6)

kirbysayshi avatar kirbysayshi commented on August 18, 2024

In your above example, you still need to set

app.set('views', path.join( __dirname, '/views') );

even if you want to use 'customers/index'. Otherwise, express is looking
for [project root]/customers/index.vash instead of [project root]/views/customers/index.vash

Yip yip,
~ Drew*

On Fri, Apr 4, 2014 at 12:24 PM, Dovernh [email protected] wrote:

Took the code vash-express-example as a starting point. Made the directory
structure like this
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617607/ee4a1484-bc14-11e3-8a12-305e5e4200ea.png

changed the code for 1 directory to look like this
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617624/2716ddf6-bc15-11e3-8f0d-5fcc1e41de7e.png

get error:
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617628/3ebb93c0-bc15-11e3-9098-a4e7d424f06a.png

I know I can change the code globally: app.set('views', path.join(
__dirname, '/views') );
But I want to easily to point to views in the views/customers and
views/orders

Reply to this email directly or view it on GitHubhttps://github.com//issues/1
.

from vash-express-example.

kirbysayshi avatar kirbysayshi commented on August 18, 2024

Whoa that got mangled by gmail. Original message:

In your above example, you still need to set app.set('views', path.join( __dirname, '/views') ); even if you want to use 'customers/index'. Otherwise, express is looking for [project root]/customers/index.vash instead of [project root]/views/customers/index.vash

Is this what you're looking for, or are you trying to do something different?

from vash-express-example.

Dovernh avatar Dovernh commented on August 18, 2024

Drew,

Still not working for me. I have:

app.set('views', path.join( __dirname, '/views') ); // critical to use path.join on windows

exports.index = function(req, res){
res.render('customers/index', {
title: 'Express'
,reasons: [
"Razor Syntax"
,"Still HTML"
,"You can macro your macros into your macros, if you want to"
]
});
};

I trying this on my mac

On Apr 4, 2014, at 4:00 PM, Andrew Petersen [email protected] wrote:

In your above example, you still need to set

app.set('views', path.join( __dirname, '/views') );

even if you want to use 'customers/index'. Otherwise, express is looking
for [project root]/customers/index.vash instead of [project root]/views/customers/index.vash

Yip yip,
~ Drew*

On Fri, Apr 4, 2014 at 12:24 PM, Dovernh [email protected] wrote:

Took the code vash-express-example as a starting point. Made the directory
structure like this
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617607/ee4a1484-bc14-11e3-8a12-305e5e4200ea.png

changed the code for 1 directory to look like this
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617624/2716ddf6-bc15-11e3-8f0d-5fcc1e41de7e.png

get error:
[image: image]https://cloud.githubusercontent.com/assets/1800249/2617628/3ebb93c0-bc15-11e3-9098-a4e7d424f06a.png

I know I can change the code globally: app.set('views', path.join(
__dirname, '/views') );
But I want to easily to point to views in the views/customers and
views/orders

Reply to this email directly or view it on GitHubhttps://github.com//issues/1
.


Reply to this email directly or view it on GitHub.

from vash-express-example.

kirbysayshi avatar kirbysayshi commented on August 18, 2024

It would really help if you committed the code and pushed it to your fork, then I could try it out.

from vash-express-example.

Dovernh avatar Dovernh commented on August 18, 2024

It’s up there on github. I am hoping you can access it. Here’s the url: https://github.com/Dovernh/vash-express-example.git

On Apr 4, 2014, at 8:41 PM, Andrew Petersen [email protected] wrote:

It would really help if you committed the code and pushed it to your fork, then I could try it out.


Reply to this email directly or view it on GitHub.

from vash-express-example.

kirbysayshi avatar kirbysayshi commented on August 18, 2024

Definitely a bug in vash! I'm working on a fix. In the meantime, you can
specify paths relative to the views directory as a workaround.

For example, in
https://github.com/Dovernh/vash-express-example/blob/75392713c17e6fd6e76ae86afe8f86deb96e51f8/views/customer/index.vash#L7,
if you use './customers/hours', it will work.

Again, it's definitely a bug, but that's a temporary workaround.

Yip yip,
~ Drew*

On Fri, Apr 4, 2014 at 10:12 PM, Dovernh [email protected] wrote:

It's up there on github. I am hoping you can access it. Here's the url:
https://github.com/Dovernh/vash-express-example.git

On Apr 4, 2014, at 8:41 PM, Andrew Petersen [email protected]
wrote:

It would really help if you committed the code and pushed it to your
fork, then I could try it out.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-39626449
.

from vash-express-example.

Related Issues (4)

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.